home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / wdj0797.zip / SDKANN.ZIP / SOURCE.ZIP / ANNOTATE.RC < prev    next >
Text File  |  1997-05-07  |  151KB  |  6,072 lines

  1. 1    RCDATA
  2. begin
  3.     "win31wh.hlp\0"
  4.     "#1    Dialog Boxes\0"
  5.     "Dialog Boxes\0"
  6.     "Dialog Boxes\0"
  7.  
  8. "WDJ SDK Annotation #1"
  9. "\r\n"
  10. "\r\n"
  11. "If a listbox is the first control in a dialog's tab order "
  12. "and the dialog box was not created with the WS_VISIBLE "
  13. "style, the listbox does not correctly draw itself with the "
  14. "focus. "
  15. "\r\n"
  16. "\r\n"
  17. "Reference: p35, March 1993 Windows/DOS Developer's Journal. "
  18. "\r\n"
  19. "\r\n"
  20. "\0\0\0\0"
  21. end
  22.  
  23. 2    RCDATA
  24. begin
  25.     "win31wh.hlp\0"
  26.     "#2    Property Lists\0"
  27.     "Property Lists\0"
  28.     "Property Lists\0"
  29.  
  30. "WDJ SDK Annotation #2"
  31. "\r\n"
  32. "\r\n"
  33. "The oft-quoted maxim that using window properties is slower "
  34. "than using class or window extra bytes (via "
  35. "GetWindowWord()/SetWindowWord()) is totally false if you use "
  36. "a global atom rather than a string to name the property.  "
  37. "Properties were about 20% slower than window words under "
  38. "Windows 3.0, but under Windows 3.1 GetProp() is about 300% "
  39. "faster than GetWindowWord(). "
  40. "\r\n"
  41. "\r\n"
  42. "Reference: p 49, March 1993 Windows/DOS Developer's Journal. "
  43. "\r\n"
  44. "\r\n"
  45. "\0\0\0\0"
  46. end
  47.  
  48. 3    RCDATA
  49. begin
  50.     "win31wh.hlp\0"
  51.     "#3    WM_MOUSEMOVE (2.x)\0"
  52.     "WM_MOUSEMOVE\0"
  53.     "WM_MOUSEMOVE (2.x)\0"
  54.  
  55. "WDJ SDK Annotation #3"
  56. "\r\n"
  57. "\r\n"
  58. "The documentation incorrectly states that the x and y "
  59. "arguments are in screen coordinates.  They are in client "
  60. "coordinates.  "
  61. "\r\n"
  62. "\r\n"
  63. "\r\n"
  64. "\0\0\0\0"
  65. end
  66.  
  67. 4    RCDATA
  68. begin
  69.     "win31wh.hlp\0"
  70.     "#4 (revised)    SetWindowsHookEx (3.1)\0"
  71.     "SetWindowsHookEx\0"
  72.     "SetWindowsHookEx (3.1)\0"
  73.  
  74. "WDJ SDK Annotation #4 (revised)"
  75. "\r\n"
  76. "\r\n"
  77. "SetWindowsHookEx() has a bug: using it to install a "
  78. "task-specific hook can cause various failures.  The "
  79. "workaround is to pass it a module handle rather than an "
  80. "instance handle.  You can obtain a module handle from "
  81. "GetModuleHandle().  If you only have the current instance "
  82. "handle and not the name of the module, use the following "
  83. "undocumented hack under Windows 3.1: "
  84. "\r\n"
  85. "\r\n"
  86. "GetModuleHandle(MAKELP(0,hInstance)); "
  87. "\r\n"
  88. "\r\n"
  89. "If you #include <windowsx.h>, you can instead use the macro "
  90. "GetInstanceModule(hInstance).  Under Windows NT, just pass a "
  91. "NULL to obtain the handle of the current process.  Note that "
  92. "the MSDN News article on this subject has the arguments to "
  93. "MAKELP() backwards.  "
  94. "\r\n"
  95. "\r\n"
  96. "\r\n"
  97. "Reference: MSDN News #1, 1993 "
  98. "Revised by: Tom Nolan "
  99. "\r\n"
  100. "\r\n"
  101. "\0\0\0\0"
  102. end
  103.  
  104. 5    RCDATA
  105. begin
  106.     "win31wh.hlp\0"
  107.     "#5    CS_BYTEALIGNWINDOW 0x2000\0"
  108.     "CS_BYTEALIGNWINDOW\0"
  109.     "CS_BYTEALIGNWINDOW 0x2000\0"
  110.  
  111. "WDJ SDK Annotation #5"
  112. "\r\n"
  113. "\r\n"
  114. "The documentation makes it sound like this style bit is the "
  115. "one you want for efficient bitblts.  In fact, most of your "
  116. "bitblts will be to the client area of the window, not the "
  117. "non-client area, so CS_BYTEALIGNCLIENT is the style bit you "
  118. "should set if you are concerned about bitblt operation "
  119. "efficiency.  Unaligned windows are slower at VGA resolution, "
  120. "but typically not an issue with higher resolution "
  121. "adapters (such as 256-color SVGA).  "
  122. "\r\n"
  123. "\r\n"
  124. "Reference: p65, December 1993 Windows/DOS Developer's Journal. "
  125. "\r\n"
  126. "\r\n"
  127. "\r\n"
  128. "\0\0\0\0"
  129. end
  130.  
  131. 6    RCDATA
  132. begin
  133.     "win31wh.hlp\0"
  134.     "#6    CODE Module Definition Statement\0"
  135.     "CODE Module Definition Statement\0"
  136.     "CODE Module Definition Statement\0"
  137.  
  138. "WDJ SDK Annotation #6"
  139. "\r\n"
  140. "\r\n"
  141. "The documentation for the FIXED attribute is incorrect.  "
  142. "Under Windows 3.1, if you mark code or data segments in your "
  143. ".exe FIXED, the loader ignores that attribute -- the "
  144. "segments will be moveable.  If you mark code or data "
  145. "segments in your .dll FIXED, however, the loader will make "
  146. "them fixed and will page lock them as well.  Due to the "
  147. "implementation of GlobalPageLock(), that can result in your "
  148. "segments using up precious DOS memory, eventually preventing "
  149. "Windows from spawning new applications (since each new "
  150. "application needs at least 512 bytes of DOS memory for a "
  151. "task database entry).  The October 1994 Windows "
  152. "Developer's Journal provides code to allocate fixed memory "
  153. "without using up precious conventional memory.  "
  154. "\r\n"
  155. "\r\n"
  156. "\r\n"
  157. "\0\0\0\0"
  158. end
  159.  
  160. 7    RCDATA
  161. begin
  162.     "win31wh.hlp\0"
  163.     "#7    WS_EX_TRANSPARENT 0x00000020L\0"
  164.     "WS_EX_TRANSPARENT\0"
  165.     "WS_EX_TRANSPARENT 0x00000020L\0"
  166.  
  167. "WDJ SDK Annotation #7"
  168. "\r\n"
  169. "\r\n"
  170. "Note that this bit does not really create transparent "
  171. "windows.  If you create a window with this style, it is true "
  172. "that the windows below it will show through as its "
  173. "background.  However, if you then move your new window, it "
  174. "will have the same background as it did in its original "
  175. "position -- blotting out whatever it is covering in its new "
  176. "position.  "
  177. "\r\n"
  178. "\r\n"
  179. "\0\0\0\0"
  180. end
  181.  
  182. 8    RCDATA
  183. begin
  184.     "win31wh.hlp\0"
  185.     "#8    WM_NCHITTEST (2.x)\0"
  186.     "WM_NCHITTEST\0"
  187.     "WM_NCHITTEST (2.x)\0"
  188.  
  189. "WDJ SDK Annotation #8"
  190. "\r\n"
  191. "\r\n"
  192. "You can process this message to allow the user to drag a "
  193. "window that does not have a title bar.  When you receive a "
  194. "WM_NCHITTEST message and the mouse is in your client area "
  195. "(or whatever conditions you want to start the drag), just "
  196. "return HTCAPTION rather than passing the message on to "
  197. "DefWindowProc().  "
  198. "\r\n"
  199. "\r\n"
  200. "Reference: p 37, March 1993 Windows/DOS Developer's Journal. "
  201. "\r\n"
  202. "\r\n"
  203. "\r\n"
  204. "\0\0\0\0"
  205. end
  206.  
  207. 9    RCDATA
  208. begin
  209.     "win31wh.hlp\0"
  210.     "#9    WM_TIMER (2.x)\0"
  211.     "WM_TIMER\0"
  212.     "WM_TIMER (2.x)\0"
  213.  
  214. "WDJ SDK Annotation #9"
  215. "\r\n"
  216. "\r\n"
  217. "Although it sounds odd, you can use a WM_TIMER message as a "
  218. "way to kill another application, if you can obtain the "
  219. "handle of the main of the application you want to kill.  "
  220. "Create a timer callback function that does nothing but pass "
  221. "its first argument (window handle) to DestroyWindow().  Then "
  222. "use PostMessage() to post (to the other app's main window) a "
  223. "WM_TIMER message that points to your callback function.  "
  224. "Your timer callback will get executed in the context of the "
  225. "target application.  "
  226. "\r\n"
  227. "\r\n"
  228. "Reference: p 64, September 1992 Windows/DOS Developer's Journal. "
  229. "\r\n"
  230. "\r\n"
  231. "\r\n"
  232. "\r\n"
  233. "\0\0\0\0"
  234. end
  235.  
  236. 10    RCDATA
  237. begin
  238.     "win31wh.hlp\0"
  239.     "#10    MemoryWrite (3.1)\0"
  240.     "MemoryWrite\0"
  241.     "MemoryWrite (3.1)\0"
  242.  
  243. "WDJ SDK Annotation #10"
  244. "\r\n"
  245. "\r\n"
  246. "MemoryWrite() has a bug in it: it trashes the high 16 bits "
  247. "of the EDI register (the 32-bit version of the DI register).  "
  248. "The workaround is to save the register before calling "
  249. "MemoryWrite() and restore it afterward.  "
  250. "\r\n"
  251. "\r\n"
  252. "Reference: p. 71, April 1994 Windows/DOS Developer's Journal "
  253. "\r\n"
  254. "\r\n"
  255. "\r\n"
  256. "\r\n"
  257. "\0\0\0\0"
  258. end
  259.  
  260. 11    RCDATA
  261. begin
  262.     "win31wh.hlp\0"
  263.     "#11    EscapeCommFunction (2.x)\0"
  264.     "EscapeCommFunction\0"
  265.     "EscapeCommFunction (2.x)\0"
  266.  
  267. "WDJ SDK Annotation #11"
  268. "\r\n"
  269. "\r\n"
  270. "The documentation omits one potential value for the "
  271. "nFunction parameter, although it is defined in windows.h.  "
  272. "The name is GETBASEIRQ and it returns the base address of "
  273. "the COM port in the lower word and the IRQ setting in the "
  274. "high word.  If the high word is -1 the port doesn't exist; "
  275. "if it is 0, the comm driver does not support this escape "
  276. "(which is the case, for example with some kinds of enhanced "
  277. "serial boards).  "
  278. "\r\n"
  279. "\r\n"
  280. "Submitted by: Thomas Zeisluft "
  281. "\r\n"
  282. "\r\n"
  283. "\0\0\0\0"
  284. end
  285.  
  286. 12    RCDATA
  287. begin
  288.     "win31wh.hlp\0"
  289.     "#12    MessageBox (2.x)\0"
  290.     "MessageBox\0"
  291.     "MessageBox (2.x)\0"
  292.  
  293. "WDJ SDK Annotation #12"
  294. "\r\n"
  295. "\r\n"
  296. "Do not call MessageBox() from within the LibMain() of an "
  297. "implicitly-linked DLL.  It will fail because the application "
  298. "will not yet have a message queue at that point, and "
  299. "MessageBox() (or anything else) cannot create its window "
  300. "when the message queue does not yet exist.  Once the "
  301. "application executes its internal startup code and calls "
  302. "InitApp(), then it has a message queue and can safely call "
  303. "functions that create windows.  "
  304. "\r\n"
  305. "\r\n"
  306. "\0\0\0\0"
  307. end
  308.  
  309. 13    RCDATA
  310. begin
  311.     "win31wh.hlp\0"
  312.     "#13    LB_ADDSTRING (2.x)\0"
  313.     "LB_ADDSTRING\0"
  314.     "LB_ADDSTRING (2.x)\0"
  315.  
  316. "WDJ SDK Annotation #13"
  317. "\r\n"
  318. "\r\n"
  319. "If you are changing the contents of a listbox (for example, "
  320. "by adding or deleting multiple strings), you may want to "
  321. "minimize screen redrawing and maximize speed by disabling "
  322. "window redrawing during your operation.  Follow these steps: "
  323. "\r\n"
  324. "\r\n"
  325. " 1) Send a WM_SETREDRAW with wParam equal to FALSE to the listbox.\r\n"
  326. " 2) Perform your adds or deletes.\r\n"
  327. " 3) Send a WM_SETREDRAW with wParam equal to TRUE to the listbox.\r\n"
  328. " 4) Use InvalidateRect() to force the listbox to redraw itself.\r\n"
  329. "\r\n"
  330. "Revised by V. Ramachandran "
  331. "\r\n"
  332. "\r\n"
  333. "\0\0\0\0"
  334. end
  335.  
  336. 14    RCDATA
  337. begin
  338.     "win31wh.hlp\0"
  339.     "#14    RegisterWindowMessage (2.x)\0"
  340.     "RegisterWindowMessage\0"
  341.     "RegisterWindowMessage (2.x)\0"
  342.  
  343. "WDJ SDK Annotation #14"
  344. "\r\n"
  345. "\r\n"
  346. "Do you really need to register a private window message? "
  347. "Probably not, if all you need is an intra-app message number "
  348. "that does not conflict with any Windows message numbers.  "
  349. "Microsoft has revised its statement about what message "
  350. "numbers are available for your private use.  Microsoft now "
  351. "guarantees that you can use message numbers 0x8000 through "
  352. "0xBFFF and they will not conflict with any system messages.  "
  353. "They also claim the next SDK (Chicago?) will define WM_APP "
  354. "equal to 0x8000 in windows.h.  "
  355. "\r\n"
  356. "\r\n"
  357. "Reference: Microsoft Knowledge Base article Q86835 "
  358. "\r\n"
  359. "\r\n"
  360. "\r\n"
  361. "\r\n"
  362. "\0\0\0\0"
  363. end
  364.  
  365. 15    RCDATA
  366. begin
  367.     "win31wh.hlp\0"
  368.     "#15    WM_CHAR (2.x)\0"
  369.     "WM_CHAR\0"
  370.     "WM_CHAR (2.x)\0"
  371.  
  372. "WDJ SDK Annotation #15"
  373. "\r\n"
  374. "\r\n"
  375. "The documentation incorrectly claims that wParam is the "
  376. "virtual key code.  In fact, it is the ASCII value of the key "
  377. "pressed.  For example, pressing the '$' (ASCII 0x5B) key "
  378. "produces a wParam equal to 0x5B -- if you interpreted that "
  379. "as a virtual key code, you would incorrectly believe that "
  380. "the user had pressed VK_HOME! "
  381. "\r\n"
  382. "\r\n"
  383. "Submitted by: Brent Rector "
  384. "\r\n"
  385. "\r\n"
  386. "\0\0\0\0"
  387. end
  388.  
  389. 16    RCDATA
  390. begin
  391.     "win31wh.hlp\0"
  392.     "#16    WinHelp (3.0)\0"
  393.     "WinHelp\0"
  394.     "WinHelp (3.0)\0"
  395.  
  396. "WDJ SDK Annotation #16"
  397. "\r\n"
  398. "\r\n"
  399. "The documentation says that the return value is nonzero if "
  400. "WinHelp() is successful.  In fact, WinHelp() only returns "
  401. "failure for systemic problems, like being unable to allocate "
  402. "global memory, or being unable to spawn winhelp.exe.  If "
  403. "WinHelp() successfully passes your request to winhelp.exe, "
  404. "it returns success, period.  So, for example, if the named "
  405. "help file is invalid, or you try to jump to a help topic "
  406. "that does not exist, or any number of other logical errors, "
  407. "WinHelp() still returns success.  "
  408. "\r\n"
  409. "\r\n"
  410. "\0\0\0\0"
  411. end
  412.  
  413. 17    RCDATA
  414. begin
  415.     "win31wh.hlp\0"
  416.     "#17    WM_ENTERIDLE (2.x)\0"
  417.     "WM_ENTERIDLE\0"
  418.     "WM_ENTERIDLE (2.x)\0"
  419.  
  420. "WDJ SDK Annotation #17"
  421. "\r\n"
  422. "\r\n"
  423. "The documentation says that this messsage gets sent to your "
  424. "application's \042main window\042.  In fact, a dialog sends the "
  425. "WM_ENTERIDLE message to its own parent window, which may or "
  426. "may not happen to be your application's main window.  "
  427. "\r\n"
  428. "\r\n"
  429. "\r\n"
  430. "\0\0\0\0"
  431. end
  432.  
  433. 18    RCDATA
  434. begin
  435.     "win31wh.hlp\0"
  436.     "#18    OPENFILENAME (3.1)\0"
  437.     "OPENFILENAME\0"
  438.     "OPENFILENAME (3.1)\0"
  439.  
  440. "WDJ SDK Annotation #18"
  441. "\r\n"
  442. "\r\n"
  443. "The documentation does not completely describe the behavior "
  444. "when selecting multiple files.  To allow the user to select "
  445. "multiple files, you turn on the flag OFN_ALLOWMULTISELECT.  "
  446. "If you do that and call GetOpenFileName(), and if the user then "
  447. "selects multiple files, then GetOpenFileName() will copy (into "
  448. "lpstrFile) the path, followed by a space, followed by "
  449. "space-separated filenames.  For example, if the user "
  450. "selected files \042fred.1\042 and \042fred.2\042 from directory "
  451. "\042c:\\test\042, lpstrFile would then point to the following "
  452. "string: "
  453. "\r\n"
  454. "\r\n"
  455. "    \042c:\\test fred.1 fred.2\042\r\n"
  456. "\r\n"
  457. "However, the documentation does not point out that if the "
  458. "user selects only one file, then the path is not kept "
  459. "separate from the filename.  Using the previous example, if "
  460. "the user selected only file \042fred.1\042, then lpstrFile would "
  461. "point to this: "
  462. "\r\n"
  463. "\r\n"
  464. "    \042c:\\test\\fred.1\042\r\n"
  465. "\r\n"
  466. "Submitted by Julian Templeman "
  467. "\r\n"
  468. "\r\n"
  469. "\r\n"
  470. "\r\n"
  471. "\0\0\0\0"
  472. end
  473.  
  474. 19    RCDATA
  475. begin
  476.     "win31wh.hlp\0"
  477.     "#19    CreateRoundRectRgn (3.0)\0"
  478.     "CreateRoundRectRgn\0"
  479.     "CreateRoundRectRgn (3.0)\0"
  480.  
  481. "WDJ SDK Annotation #19"
  482. "\r\n"
  483. "\r\n"
  484. "This function has a bug.  It will produce a GP fault if the "
  485. "region rectangle is empty (either nLeftRect equals "
  486. "nRightRect, or nBottomRect equals nTopRect).  About the only "
  487. "workaround is to create a wrapper function that first checks "
  488. "whether the rectangle is empty.  "
  489. "\r\n"
  490. "\r\n"
  491. "Reference: p67, June 1994 Windows/DOS Developer's Journal\r\n"
  492. "Submitted by Chris Mason "
  493. "\r\n"
  494. "\r\n"
  495. "\r\n"
  496. "\r\n"
  497. "\0\0\0\0"
  498. end
  499.  
  500. 20    RCDATA
  501. begin
  502.     "win31wh.hlp\0"
  503.     "#20    EnableMenuItem (2.x)\0"
  504.     "EnableMenuItem\0"
  505.     "EnableMenuItem (2.x)\0"
  506.  
  507. "WDJ SDK Annotation #20"
  508. "\r\n"
  509. "\r\n"
  510. "When you are making changes to a window menu, the menu bar "
  511. "is not immediately updated.  To force those changes (such as "
  512. "enabling/disabling menu items) to be visible right away, "
  513. "make sure you call DrawMenuBar().  "
  514. "\r\n"
  515. "\r\n"
  516. "\0\0\0\0"
  517. end
  518.  
  519. 21    RCDATA
  520. begin
  521.     "win31wh.hlp\0"
  522.     "#21    DrawText (2.x)\0"
  523.     "DrawText\0"
  524.     "DrawText (2.x)\0"
  525.  
  526. "WDJ SDK Annotation #21"
  527. "\r\n"
  528. "\r\n"
  529. "DrawText() has an off-by-one error that can result in a GP "
  530. "fault.  The bug is evoked when you use pass an explicit "
  531. "string length instead of NULL-terminating the text string.  "
  532. "The bug is not evoked if you use the DT_NOPREFIX flag, or if "
  533. "you NULL-terminate the text string (the easiest workaround).  "
  534. "\r\n"
  535. "\r\n"
  536. "Reference: p53, August 1994 Windows/DOS Developer's Journal "
  537. "\r\n"
  538. "\r\n"
  539. "\0\0\0\0"
  540. end
  541.  
  542. 22    RCDATA
  543. begin
  544.     "win31wh.hlp\0"
  545.     "#22    WM_MEASUREITEM (3.0)\0"
  546.     "WM_MEASUREITEM\0"
  547.     "WM_MEASUREITEM (3.0)\0"
  548.  
  549. "WDJ SDK Annotation #22"
  550. "\r\n"
  551. "\r\n"
  552. "Windows supports owner-draw menus, but only popup owner-draw "
  553. "menus work correctly.  If you try to create an owner-draw "
  554. "menubar for a window, Windows will not send you the "
  555. "WM_MEASUREITEM message as it should.  "
  556. "\r\n"
  557. "\r\n"
  558. "Reference: Microsoft Knowledge Base article Q69969 "
  559. "\r\n"
  560. "\r\n"
  561. "\0\0\0\0"
  562. end
  563.  
  564. 23    RCDATA
  565. begin
  566.     "win31wh.hlp\0"
  567.     "#23    WINDOWPOS (3.1)\0"
  568.     "WINDOWPOS\0"
  569.     "WINDOWPOS (3.1)\0"
  570.  
  571. "WDJ SDK Annotation #23"
  572. "\r\n"
  573. "\r\n"
  574. "The documentation says that y is \042the position of the right "
  575. "edge of the window\042.  It is, of course, the position of the "
  576. "top edge of the window.  "
  577. "\r\n"
  578. "\r\n"
  579. "\r\n"
  580. "\0\0\0\0"
  581. end
  582.  
  583. 24    RCDATA
  584. begin
  585.     "win31wh.hlp\0"
  586.     "#24    Shell Dynamic-Data Exchange Interface Overview (3.1)\0"
  587.     "Shell Dynamic-Data Exchange Interface Overview\0"
  588.     "Shell Dynamic-Data Exchange Interface Overview (3.1)\0"
  589.  
  590. "WDJ SDK Annotation #24"
  591. "\r\n"
  592. "\r\n"
  593. "The documentation says you can use DDE to get a list of "
  594. "Program Manager groups by \042issuing a request for the Group "
  595. "item.\042 In fact, that is not the correct item name -- you "
  596. "must use 'Groups', not 'Group'.  "
  597. "\r\n"
  598. "\r\n"
  599. "\r\n"
  600. "\r\n"
  601. "\0\0\0\0"
  602. end
  603.  
  604. 25    RCDATA
  605. begin
  606.     "win31wh.hlp\0"
  607.     "#25    TrackPopupMenu (3.0)\0"
  608.     "TrackPopupMenu\0"
  609.     "TrackPopupMenu (3.0)\0"
  610.  
  611. "WDJ SDK Annotation #25"
  612. "\r\n"
  613. "\r\n"
  614. "The documentation incorrectly states that you can pass the "
  615. "TPM_RIGHTBUTTON flag if you want the menu to respond to the "
  616. "right (secondary) mouse button instead of the left (primary) "
  617. "mouse button.  In fact, passing TPM_RIGHTBUTTON causes the "
  618. "menu to respond to the right mouse button as well as the "
  619. "left.  There is apparently no combination of bits that cause "
  620. "the menu to respond only to the right mouse button.  "
  621. "\r\n"
  622. "\r\n"
  623. "\r\n"
  624. "\0\0\0\0"
  625. end
  626.  
  627. 26    RCDATA
  628. begin
  629.     "win31wh.hlp\0"
  630.     "#26    SetDlgItemText (2.x)\0"
  631.     "SetDlgItemText\0"
  632.     "SetDlgItemText (2.x)\0"
  633.  
  634. "WDJ SDK Annotation #26"
  635. "\r\n"
  636. "\r\n"
  637. "There is a bug in Windows that keeps SetWindowText() and "
  638. "SetDlgItemText() from working correctly when applied to an "
  639. "edit control owned by another application.  Rather than "
  640. "sending a WM_SETTEXT to the edit control as they should, "
  641. "these functions directly tinker with the target control's "
  642. "internal window structure to change its title.  The bug, "
  643. "then, is twofold: "
  644. "\r\n"
  645. "\r\n"
  646. " a) The target window is never notified that it\r\n"
  647. "    needs to repaint.\r\n"
  648. " b) An edit control ignores its title, so changing\r\n"
  649. "    its title does not affect the text it contains.\r\n"
  650. "\r\n"
  651. "The workaround is to use SendMessage() or PostMessage() to "
  652. "deliver a WM_SETTEXT to the target window.  If you use "
  653. "PostMessage(), make sure you pass a string pointer that is "
  654. "somehow guaranteed to still be valid whenever the target "
  655. "application gets around to fetching and processing the "
  656. "message.  "
  657. "\r\n"
  658. "\r\n"
  659. "Reference: p. 71, September 1993 Windows/DOS Developer's Journal "
  660. "\r\n"
  661. "\r\n"
  662. "\r\n"
  663. "\0\0\0\0"
  664. end
  665.  
  666. 27    RCDATA
  667. begin
  668.     "win31wh.hlp\0"
  669.     "#27    GetMenuItemID (2.x)\0"
  670.     "GetMenuItemID\0"
  671.     "GetMenuItemID (2.x)\0"
  672.  
  673. "WDJ SDK Annotation #27"
  674. "\r\n"
  675. "\r\n"
  676. "The documentation says that this function returns 0 if the "
  677. "specified menu item is a separator.  In fact, although the "
  678. "resource compiler implicitly assigns separators an ID of 0, "
  679. "you can assign them any 16-bit ID you like (with "
  680. "ModifyMenu(), InsertMenu(), etc.) and this function will "
  681. "return the correct ID, not just zero.  "
  682. "\r\n"
  683. "\r\n"
  684. "\r\n"
  685. "\0\0\0\0"
  686. end
  687.  
  688. 28    RCDATA
  689. begin
  690.     "win31wh.hlp\0"
  691.     "#28    GetMetaFile (2.x)\0"
  692.     "GetMetaFile\0"
  693.     "GetMetaFile (2.x)\0"
  694.  
  695. "WDJ SDK Annotation #28"
  696. "\r\n"
  697. "\r\n"
  698. "Most programs that write a \042Windows metafile\042 to disk use a "
  699. "newer file format that this function does not understand.  "
  700. "Most programs read and write \042placeable\042 metafiles, a "
  701. "metafile with a 22-byte header that contains a minimum "
  702. "bounding rectangle for the figure.  If you want to read in a "
  703. "metafile that may have been written by another application, "
  704. "you should open the file yourself and check the header to "
  705. "see if it is a placeable metafile.  See the SDK "
  706. "documentation for a description of \042placeable Windows "
  707. "metafiles\042.  "
  708. "\r\n"
  709. "\r\n"
  710. "Reference: p. 43, November 1994 Windows/DOS Developer's Journal "
  711. "\r\n"
  712. "\r\n"
  713. "\r\n"
  714. "\0\0\0\0"
  715. end
  716.  
  717. 29    RCDATA
  718. begin
  719.     "win31wh.hlp\0"
  720.     "#29    WritePrivateProfileString (3.0)\0"
  721.     "WritePrivateProfileString\0"
  722.     "WritePrivateProfileString (3.0)\0"
  723.  
  724. "WDJ SDK Annotation #29"
  725. "\r\n"
  726. "\r\n"
  727. "The documentation for WritePrivateProfileString() and the "
  728. "prototypes in windows.h, indicate that all strings passed in "
  729. "are LPCSTR (32-bit pointer to unmodifiable character "
  730. "string).  However, sometimes this function writes on your "
  731. "input string anyway! For one example, if you pass in the "
  732. "string "
  733. "\r\n"
  734. "\r\n"
  735. "\042Hello World     \042 "
  736. "\r\n"
  737. "\r\n"
  738. "the function will remove the trailing spaces by writing a "
  739. "NULL byte after the 'd'.  If you were passing in a constant "
  740. "string that resided in a code segment, this aberrant "
  741. "behavior could result in a GP fault.  This function "
  742. "absolutely should not modify a string declared as LPCSTR, "
  743. "but since it does, beware! "
  744. "\r\n"
  745. "\r\n"
  746. "Submitted by Charles Leamon "
  747. "\r\n"
  748. "\r\n"
  749. "\0\0\0\0"
  750. end
  751.  
  752. 30    RCDATA
  753. begin
  754.     "win31wh.hlp\0"
  755.     "#30    GetMenuState (2.x)\0"
  756.     "GetMenuState\0"
  757.     "GetMenuState (2.x)\0"
  758.  
  759. "WDJ SDK Annotation #30"
  760. "\r\n"
  761. "\r\n"
  762. "In addition to the bits noted in the documentation, this "
  763. "function also correctly returns MF_POPUP for a submenu.  "
  764. "Oddly, if you located the popup by position, the "
  765. "MF_BYPOSITION flag will also be set in the returned flags, "
  766. "although it is not on when used to locate normal menu items.  "
  767. "Note that some of these flags equate to zero, so you cannot "
  768. "just AND them with the returned flags to see if they are on.  "
  769. "Here are the flags that equate to zero, along with the "
  770. "expression you can use to infer their presence: "
  771. "\r\n"
  772. "\r\n"
  773. " Zero Flag               Expression to test for flag\r\n"
  774. " ==============   =================================\r\n"
  775. " MF_ENABLED       !(Flag&~(MF_DISABLED|MF_GRAYED)) \r\n"
  776. " MF_UNCHECKED     !(Flag&~MF_CHECKED)              \r\n"
  777. " MF_STRING        !(Flag&~(MF_BITMAP|MF_OWNERDRAW))\r\n"
  778. "\r\n"
  779. "\r\n"
  780. "\0\0\0\0"
  781. end
  782.  
  783. 31    RCDATA
  784. begin
  785.     "win31wh.hlp\0"
  786.     "#31    GetWindowPlacement (3.1)\0"
  787.     "GetWindowPlacement\0"
  788.     "GetWindowPlacement (3.1)\0"
  789.  
  790. "WDJ SDK Annotation #31"
  791. "\r\n"
  792. "\r\n"
  793. "From the documentation, you might think the following code "
  794. "would work: "
  795. "\r\n"
  796. "\r\n"
  797. " WINDOWPLACEMENT Info;\r\n"
  798. " GetWindowPlacement(hWnd, &Info);\r\n"
  799. "\r\n"
  800. "In fact, it won't.  You must remember to initialize the "
  801. "\042length\042 field of the structure before calling this "
  802. "function.  The following code works: "
  803. "\r\n"
  804. "\r\n"
  805. " WINDOWPLACEMENT Info;\r\n"
  806. " Info.length  = sizeof(Info);\r\n"
  807. " GetWindowPlacement(hWnd, &Info);\r\n"
  808. "\r\n"
  809. "Submitted by Pete Davis "
  810. "\r\n"
  811. "\r\n"
  812. "\r\n"
  813. "\r\n"
  814. "\0\0\0\0"
  815. end
  816.  
  817. 32    RCDATA
  818. begin
  819.     "win31wh.hlp\0"
  820.     "#32    CreateCompatibleBitmap (2.x)\0"
  821.     "CreateCompatibleBitmap\0"
  822.     "CreateCompatibleBitmap (2.x)\0"
  823.  
  824. "WDJ SDK Annotation #32"
  825. "\r\n"
  826. "\r\n"
  827. "The description of height and width parameters states that "
  828. "these values are in bits, when actually they are in pixels.  "
  829. "\r\n"
  830. "\r\n"
  831. "Submitted by Charles Leamon "
  832. "\r\n"
  833. "\r\n"
  834. "\r\n"
  835. "\0\0\0\0"
  836. end
  837.  
  838. 33    RCDATA
  839. begin
  840.     "win31wh.hlp\0"
  841.     "#33    LoadCursor (2.x)\0"
  842.     "LoadCursor\0"
  843.     "LoadCursor (2.x)\0"
  844.  
  845. "WDJ SDK Annotation #33"
  846. "\r\n"
  847. "\r\n"
  848. "The documentation says that you should call DestroyCursor() "
  849. "for cursors loaded via LoadCursor().  That is wrong -- you "
  850. "should only call DestroyCursor() for cursors created with "
  851. "CreateCursor().  "
  852. "\r\n"
  853. "\r\n"
  854. "Submitted by Charles Leamon\r\n"
  855. "Reference: Microsoft Knowledge Base article Q84779 "
  856. "\r\n"
  857. "\r\n"
  858. "\r\n"
  859. "\0\0\0\0"
  860. end
  861.  
  862. 34    RCDATA
  863. begin
  864.     "win31wh.hlp\0"
  865.     "#34    lstrcpyn (3.1)\0"
  866.     "lstrcpyn\0"
  867.     "lstrcpyn (3.1)\0"
  868.  
  869. "WDJ SDK Annotation #34"
  870. "\r\n"
  871. "\r\n"
  872. "The documentation for lstrcpyn() states that the last "
  873. "parameter (cChars) is the number of characters to be copied, "
  874. "when in fact the number of characters will be cChars-1.  "
  875. "That's convenient, but it's not what it says and it's "
  876. "inconsistent with the standard ANSI C run-time function "
  877. "strncpy(), which does copy the specified count.  In other "
  878. "words, unlike strncpy(), this function always "
  879. "NULL-terminates the destination string.  "
  880. "\r\n"
  881. "\r\n"
  882. "Submitted by Charles Leamon "
  883. "\r\n"
  884. "\r\n"
  885. "\r\n"
  886. "\0\0\0\0"
  887. end
  888.  
  889. 35    RCDATA
  890. begin
  891.     "win31wh.hlp\0"
  892.     "#36    ExitWindows (3.0)\0"
  893.     "ExitWindows\0"
  894.     "ExitWindows (3.0)\0"
  895.  
  896. "WDJ SDK Annotation #36"
  897. "\r\n"
  898. "\r\n"
  899. "The documentation is incomplete.  To just terminate Windows "
  900. "and return control to DOS, pass a zero in the dwReturnCode "
  901. "parameter.  "
  902. "\r\n"
  903. "\r\n"
  904. "Submitted by Charles Leamon\r\n"
  905. "Reference: Microsoft Knowledge Base article Q100359 "
  906. "\r\n"
  907. "\r\n"
  908. "\r\n"
  909. "\0\0\0\0"
  910. end
  911.  
  912. 36    RCDATA
  913. begin
  914.     "win31wh.hlp\0"
  915.     "#37    OpenFile (2.x)\0"
  916.     "OpenFile\0"
  917.     "OpenFile (2.x)\0"
  918.  
  919. "WDJ SDK Annotation #37"
  920. "\r\n"
  921. "\r\n"
  922. "\r\n"
  923. "The descriptions for OF_CANCEL and OF_PROMPT are incorrect.  "
  924. "OF_CANCEL does not add a cancel button to the 'File not "
  925. "found' (OF_PROMPT) dialog.  Even if it did, how would the "
  926. "caller know the user pressed the cancel button (only one "
  927. "error return is defined for OpenFile())? The OF_PROMPT "
  928. "dialog does not prompt the user to insert a diskette into "
  929. "drive A: "
  930. "\r\n"
  931. "\r\n"
  932. "Submitted by Charles Leamon "
  933. "\r\n"
  934. "\r\n"
  935. "\r\n"
  936. "\r\n"
  937. "\0\0\0\0"
  938. end
  939.  
  940. 37    RCDATA
  941. begin
  942.     "win31wh.hlp\0"
  943.     "#38    WM_NCHITTEST (2.x)\0"
  944.     "WM_NCHITTEST\0"
  945.     "WM_NCHITTEST (2.x)\0"
  946.  
  947. "WDJ SDK Annotation #38"
  948. "\r\n"
  949. "\r\n"
  950. "The documentation claims that this message is sent to the "
  951. "window that used SetCapture() to capture mouse input.  That "
  952. "is totally false.  The window whose handle is passed to "
  953. "SetCapture() will never receive any WM_NCHITTEST messages "
  954. "(no matter where you move the moust) while the mouse is "
  955. "captured.  "
  956. "\r\n"
  957. "\r\n"
  958. "Submitted by V. Ramachandran "
  959. "\r\n"
  960. "\r\n"
  961. "\r\n"
  962. "\0\0\0\0"
  963. end
  964.  
  965. 38    RCDATA
  966. begin
  967.     "win31wh.hlp\0"
  968.     "#39    TabbedTextOut (3.0)\0"
  969.     "TabbedTextOut\0"
  970.     "TabbedTextOut (3.0)\0"
  971.  
  972. "WDJ SDK Annotation #39"
  973. "\r\n"
  974. "\r\n"
  975. "The documentation claims that the tab stops are in device "
  976. "units (pixels), but that is not true.  The tab stops are "
  977. "treated as logical units, not device units.  "
  978. "\r\n"
  979. "\r\n"
  980. "Submitted by Dan Miser\r\n"
  981. "Reference: Microsoft Knowledge Base article Q113253 "
  982. "\r\n"
  983. "\r\n"
  984. "\r\n"
  985. "\0\0\0\0"
  986. end
  987.  
  988. 39    RCDATA
  989. begin
  990.     "win31wh.hlp\0"
  991.     "#40    LoadIcon (2.x)\0"
  992.     "LoadIcon\0"
  993.     "LoadIcon (2.x)\0"
  994.  
  995. "WDJ SDK Annotation #40"
  996. "\r\n"
  997. "\r\n"
  998. "The documentation says that you should call DestroyIcon() "
  999. "for cursors loaded via LoadIcon().  That is wrong -- you "
  1000. "should only call DestroyIcon() for icons created with "
  1001. "CreateIcon().  "
  1002. "\r\n"
  1003. "\r\n"
  1004. "Submitted by Charles Leamon\r\n"
  1005. "Reference: Microsoft Knowledge Base article Q84779 "
  1006. "\r\n"
  1007. "\r\n"
  1008. "\r\n"
  1009. "\0\0\0\0"
  1010. end
  1011.  
  1012. 40    RCDATA
  1013. begin
  1014.     "win31wh.hlp\0"
  1015.     "#41    COMPAREITEMSTRUCT (3.0)\0"
  1016.     "COMPAREITEMSTRUCT\0"
  1017.     "COMPAREITEMSTRUCT (3.0)\0"
  1018.  
  1019. "WDJ SDK Annotation #41"
  1020. "\r\n"
  1021. "\r\n"
  1022. "Note that Windows has to send a WM_COMPAREITEM message when "
  1023. "a new item is added to the list, in order to determine its "
  1024. "correct position.  That means it does not know the position "
  1025. "of the new item yet, so (contrary to the documentation) the "
  1026. "itemID2 field in this structure will be -1 -- do not assume "
  1027. "it will be a legal index value.  "
  1028. "\r\n"
  1029. "\r\n"
  1030. "Submitted by V. Ramachandran "
  1031. "\r\n"
  1032. "\r\n"
  1033. "\r\n"
  1034. "\0\0\0\0"
  1035. end
  1036.  
  1037. 41    RCDATA
  1038. begin
  1039.     "win31wh.hlp\0"
  1040.     "#42    GetProcAddress (2.x)\0"
  1041.     "GetProcAddress\0"
  1042.     "GetProcAddress (2.x)\0"
  1043.  
  1044. "WDJ SDK Annotation #42"
  1045. "\r\n"
  1046. "\r\n"
  1047. "In attempting to locate the named function in the target "
  1048. "module, GetProcAddress() converts the function name to "
  1049. "uppercase and then performs a case-sensitive search.  That "
  1050. "means that GetProcAddress() cannot locate functions exported "
  1051. "with names containing lowercase characters.  Normally, "
  1052. "that's not a problem, as the __pascal calling sequence "
  1053. "forces uppercase names.  However, depending on the compiler "
  1054. "and linker tools and options you use, it is possible to "
  1055. "export __cdecl calling sequence functions with lowercase "
  1056. "characters, resulting in a function that GetProcAddress() "
  1057. "cannot locate.  "
  1058. "\r\n"
  1059. "\r\n"
  1060. "Submitted by Keith Bluestone "
  1061. "\r\n"
  1062. "\r\n"
  1063. "\0\0\0\0"
  1064. end
  1065.  
  1066. 42    RCDATA
  1067. begin
  1068.     "win31wh.hlp\0"
  1069.     "#43    SetScrollRange (2.x)\0"
  1070.     "SetScrollRange\0"
  1071.     "SetScrollRange (2.x)\0"
  1072.  
  1073. "WDJ SDK Annotation #43"
  1074. "\r\n"
  1075. "\r\n"
  1076. "The documentation says you can use this function to hide or "
  1077. "show standard scroll bars, but does not tell you how! "
  1078. "Basically, if you specify the same value for both the "
  1079. "minimum (nMin) and maximum (nMax) scrolling positions, the "
  1080. "function will hide the scroll bar.  If the two positions are "
  1081. "not equal, the function will display the scroll bar.  "
  1082. "\r\n"
  1083. "\r\n"
  1084. "Submitted by Paul Bonneau "
  1085. "\r\n"
  1086. "\r\n"
  1087. "\r\n"
  1088. "\0\0\0\0"
  1089. end
  1090.  
  1091. 43    RCDATA
  1092. begin
  1093.     "win31wh.hlp\0"
  1094.     "#44    LoadLibrary (2.x)\0"
  1095.     "LoadLibrary\0"
  1096.     "LoadLibrary (2.x)\0"
  1097.  
  1098. "WDJ SDK Annotation #44"
  1099. "\r\n"
  1100. "\r\n"
  1101. "If LoadLibrary() cannot find the library, it may display an "
  1102. "error message to the user, depending upon the state of "
  1103. "Windows' \042error mode\042.  If you want to handle that case "
  1104. "yourself and make sure Windows does not display the error "
  1105. "message, see the documentation for the function "
  1106. "SetErrorMode().  For example, the following code attempts to "
  1107. "load the library ctl3d.dll, but does not emit an error "
  1108. "message if it is not found.  "
  1109. "\r\n"
  1110. "\r\n"
  1111. "HINSTANCE Ctl3d;\r\n"
  1112. "UINT OldFlag = SetErrorMode(SEM_NOOPENFILEERRORBOX);\r\n"
  1113. "Ctl3d        = LoadLibrary(\042ctl3d.dll\042);\r\n"
  1114. "SetErrorMode(OldFlag);  // restore previous mode\r\n"
  1115. "if(Ctl3d <= HINSTANCE_ERROR)\r\n"
  1116. "    // LoadLibrary() failed for some reason\r\n"
  1117. "\r\n"
  1118. "\r\n"
  1119. "\0\0\0\0"
  1120. end
  1121.  
  1122. 44    RCDATA
  1123. begin
  1124.     "win31wh.hlp\0"
  1125.     "#45    LoadLibrary (2.x)\0"
  1126.     "LoadLibrary\0"
  1127.     "LoadLibrary (2.x)\0"
  1128.  
  1129. "WDJ SDK Annotation #45"
  1130. "\r\n"
  1131. "\r\n"
  1132. "\r\n"
  1133. "The documentation claims this function returns an error code "
  1134. "of 0 if \042System was out of memory, executable file was "
  1135. "corrupt, or relocations were invalid\042.  However, if a "
  1136. "library's LibMain() function returns 0 (signifying some "
  1137. "logical error during initialization), LoadLibrary() also "
  1138. "returns 0.  Therefore, do not assume that a 0 error code "
  1139. "means the system was out of memory or that the module was "
  1140. "corrupt in some way.  "
  1141. "\r\n"
  1142. "\r\n"
  1143. "\r\n"
  1144. "\0\0\0\0"
  1145. end
  1146.  
  1147. 45    RCDATA
  1148. begin
  1149.     "win31wh.hlp\0"
  1150.     "#46    DdeClientTransaction (3.1)\0"
  1151.     "DdeClientTransaction\0"
  1152.     "DdeClientTransaction (3.1)\0"
  1153.  
  1154. "WDJ SDK Annotation #46"
  1155. "\r\n"
  1156. "\r\n"
  1157. "The documentation does not say so, but the cbData argument "
  1158. "(length of data) must include the NULL byte if the data is a "
  1159. "string.  In other words, if lpvData is a string, cbData must "
  1160. "be set to strlen(lpvData)+1.  Otherwise, bad things may "
  1161. "happen in DDEML when you perform an XTYP_POKE or "
  1162. "XTYP_EXECUTE.  "
  1163. "\r\n"
  1164. "\r\n"
  1165. "Submitted by Mark Reha\r\n"
  1166. "Reference: Microsoft Knowledge Base article Q107387. "
  1167. "\r\n"
  1168. "\r\n"
  1169. "\r\n"
  1170. "\0\0\0\0"
  1171. end
  1172.  
  1173. 46    RCDATA
  1174. begin
  1175.     "win31wh.hlp\0"
  1176.     "#47    WinHelp (3.0)\0"
  1177.     "WinHelp\0"
  1178.     "WinHelp (3.0)\0"
  1179.  
  1180. "WDJ SDK Annotation #47"
  1181. "\r\n"
  1182. "\r\n"
  1183. "The WinHelp() API function normally allows one to execute "
  1184. "macros, jumps, popups, and so on.  However, if WinHelp was "
  1185. "started with WinExec() (i.e.  from Program Manager or File "
  1186. "Manager) instead of the WinHelp() API function, you will not "
  1187. "be able to execute macros or jumps on that help file without "
  1188. "starting up a second instance of the help file using the "
  1189. "WinHelp() API function.  "
  1190. "\r\n"
  1191. "\r\n"
  1192. "There is one way around this.  You can create a DLL with an "
  1193. "LDLLHandler that gets the callback address for the FAPI() "
  1194. "function from WinHelp.  FAPI() has the same parameters as "
  1195. "the WinHelp() API function except that the first parameters "
  1196. "(HWND) is not in FAPI() (so FAPI() only has 3 parameters).  "
  1197. "The FAPI() function will allow you to execute macros, jumps, "
  1198. "popups, etc regardless of how WinHelp was launched.  For "
  1199. "more information, get the Windows Help Authors Guide from "
  1200. "the MSDN CD-ROM or see Jim Mischel's book \042The Developer's "
  1201. "Guide to WINHELP.EXE\042.  "
  1202. "\r\n"
  1203. "\r\n"
  1204. "Submitted by Pete Davis "
  1205. "\r\n"
  1206. "\r\n"
  1207. "\r\n"
  1208. "\0\0\0\0"
  1209. end
  1210.  
  1211. 47    RCDATA
  1212. begin
  1213.     "win31wh.hlp\0"
  1214.     "#48    _fpmath (2.x)\0"
  1215.     "_fpmath\0"
  1216.     "_fpmath (2.x)\0"
  1217.  
  1218. "WDJ SDK Annotation #48"
  1219. "\r\n"
  1220. "\r\n"
  1221. "When setting the handler for coprocessor error exceptions "
  1222. "(function 3), the documentation incorrectly says you should "
  1223. "place the address of your exception handler in DS:AX.  The "
  1224. "correct registers to use for this 32-bit address are DX:AX.  "
  1225. "\r\n"
  1226. "\r\n"
  1227. "Submitted by Manfred Keul "
  1228. "\r\n"
  1229. "\r\n"
  1230. "\r\n"
  1231. "\0\0\0\0"
  1232. end
  1233.  
  1234. 48    RCDATA
  1235. begin
  1236.     "win31wh.hlp\0"
  1237.     "#49    VerQueryValue (3.1)\0"
  1238.     "VerQueryValue\0"
  1239.     "VerQueryValue (3.1)\0"
  1240.  
  1241. "WDJ SDK Annotation #49"
  1242. "\r\n"
  1243. "\r\n"
  1244. "Amazingly, even though the second parameter to this function "
  1245. "is declared const (LPCSTR), VerQueryValue() modifies that "
  1246. "string anyway! Apparently the code replaces a '\\' in your "
  1247. "string with a NULL byte temporarily and then puts it back.  "
  1248. "This is a bug.  For example, suppose you use a compiler "
  1249. "option that places constant strings in read-only code "
  1250. "segments (for Microsoft, \042/Gf\042; for Borland \042-dc\042).  In that "
  1251. "case, passing such a constant string as the second argument "
  1252. "to this function results in a GP fault.  "
  1253. "\r\n"
  1254. "\r\n"
  1255. "Submitted by David Lowndes "
  1256. "\r\n"
  1257. "\r\n"
  1258. "\r\n"
  1259. "\0\0\0\0"
  1260. end
  1261.  
  1262. 49    RCDATA
  1263. begin
  1264.     "win31wh.hlp\0"
  1265.     "#50    GetProfileString (2.x)\0"
  1266.     "GetProfileString\0"
  1267.     "GetProfileString (2.x)\0"
  1268.  
  1269. "WDJ SDK Annotation #50"
  1270. "\r\n"
  1271. "\r\n"
  1272. "This applies to both GetProfileString() and "
  1273. "GetPrivateProfileString().  If the default value for these "
  1274. "functions contains trailing blanks and the default value is "
  1275. "used because the key did not appear in the INI file, Windows "
  1276. "will null-terminate the string (even though it is declared "
  1277. "const!) at the first trailing blank.  If that string is a "
  1278. "literal string and the code is compiled with some "
  1279. "optimizations then the string will end up in a code segment, "
  1280. "resulting in a GPF when the API function attempts to modify "
  1281. "it. "
  1282. "\r\n"
  1283. "\r\n"
  1284. "GetProfileString() and GetPrivateProfileString() also strip "
  1285. "out any leading spaces, and any leading and trailing quotes "
  1286. "(single or double quotes). "
  1287. "\r\n"
  1288. "\r\n"
  1289. "Submitted by Michael E. Kropp.\r\n"
  1290. "Revised by Kai Riihioja "
  1291. "\r\n"
  1292. "\r\n"
  1293. "\r\n"
  1294. "\r\n"
  1295. "\r\n"
  1296. "\0\0\0\0"
  1297. end
  1298.  
  1299. 50    RCDATA
  1300. begin
  1301.     "win31wh.hlp\0"
  1302.     "#50    GetPrivateProfileString (2.x)\0"
  1303.     "GetPrivateProfileString\0"
  1304.     "GetPrivateProfileString (2.x)\0"
  1305.  
  1306. "WDJ SDK Annotation #50"
  1307. "\r\n"
  1308. "\r\n"
  1309. "This applies to both GetProfileString() and "
  1310. "GetPrivateProfileString().  If the default value for these "
  1311. "functions contains trailing blanks and the default value is "
  1312. "used because the key did not appear in the INI file, Windows "
  1313. "will null-terminate the string (even though it is declared "
  1314. "const!) at the first trailing blank.  If that string is a "
  1315. "literal string and the code is compiled with some "
  1316. "optimizations then the string will end up in a code segment, "
  1317. "resulting in a GPF when the API function attempts to modify "
  1318. "it. "
  1319. "\r\n"
  1320. "\r\n"
  1321. "GetProfileString() and GetPrivateProfileString() also strip "
  1322. "out any leading spaces, and any leading and trailing quotes "
  1323. "(single or double quotes). "
  1324. "\r\n"
  1325. "\r\n"
  1326. "Submitted by Michael E. Kropp.\r\n"
  1327. "Revised by Kai Riihioja "
  1328. "\r\n"
  1329. "\r\n"
  1330. "\r\n"
  1331. "\r\n"
  1332. "\r\n"
  1333. "\0\0\0\0"
  1334. end
  1335.  
  1336. 51    RCDATA
  1337. begin
  1338.     "win31wh.hlp\0"
  1339.     "#51    GetTickCount (2.x)\0"
  1340.     "GetTickCount\0"
  1341.     "GetTickCount (2.x)\0"
  1342.  
  1343. "WDJ SDK Annotation #51"
  1344. "\r\n"
  1345. "\r\n"
  1346. "GetTickCount() may return units of milliseconds, but its "
  1347. "resolution is much worse than one millisecond under Windows "
  1348. "3.1.  For more accurate timings, call the function "
  1349. "timeGetTime(), which is defined in mmsystem.h.  "
  1350. "\r\n"
  1351. "\r\n"
  1352. "\r\n"
  1353. "\r\n"
  1354. "\0\0\0\0"
  1355. end
  1356.  
  1357. 52    RCDATA
  1358. begin
  1359.     "win31wh.hlp\0"
  1360.     "#52    GetWinFlags (3.0)\0"
  1361.     "GetWinFlags\0"
  1362.     "GetWinFlags (3.0)\0"
  1363.  
  1364. "WDJ SDK Annotation #52"
  1365. "\r\n"
  1366. "\r\n"
  1367. "GetWinFlags() can also tell you if your 16-bit Windows 3.1 "
  1368. "application is running under Windows NT: "
  1369. "\r\n"
  1370. "\r\n"
  1371. "    if(GetWinFlags() & 0x04000)\r\n"
  1372. "        // then we are running under Windows NT\r\n"
  1373. "\r\n"
  1374. "Submitted by Paula Tomlinson.\r\n"
  1375. "Reference: \042The Ultimate Windows Version Detector\042, "
  1376. "Windows/DOS Developer's Journal, February 1995.  "
  1377. "\r\n"
  1378. "\r\n"
  1379. "\r\n"
  1380. "\0\0\0\0"
  1381. end
  1382.  
  1383. 53    RCDATA
  1384. begin
  1385.     "win31wh.hlp\0"
  1386.     "#53    KillTimer (2.x)\0"
  1387.     "KillTimer\0"
  1388.     "KillTimer (2.x)\0"
  1389.  
  1390. "WDJ SDK Annotation #53"
  1391. "\r\n"
  1392. "\r\n"
  1393. "Under at least one condition, KillTimer() does not remove a "
  1394. "pending WM_TIMER message from the message queue as "
  1395. "documented.  First, understand that Windows just sets a bit "
  1396. "when a timer fires; it does not generate a WM_TIMER message "
  1397. "at that time.  A timer message is secretly added to your "
  1398. "input queue when you call GetMessage() or PeekMessage() and "
  1399. "a timer event is pending and no other messages are in the "
  1400. "queue.  "
  1401. "\r\n"
  1402. "\r\n"
  1403. "If you are using a PeekMessage() call with the PM_NOREMOVE "
  1404. "flag and if the timer bit is on at that point, PeekMessage() "
  1405. "will place a WM_TIMER message in the queue, but won't remove "
  1406. "it.  If you then call KillTimer(), it will ensure the timer "
  1407. "bit is off but won't remove the WM_TIMER message.  The next "
  1408. "call to GetMessage() or PeekMessage() returns this WM_TIMER "
  1409. "message.  One workaround is to use code like this to "
  1410. "terminate a timer: "
  1411. "\r\n"
  1412. "\r\n"
  1413. "    KillTimer (hWnd, ID);\r\n"
  1414. "    if (LOWORD (GetQueueStatus (QS_TIMER)) & QS_TIMER)\r\n"
  1415. "         PeekMessage (&msg, hWnd, WM_TIMER, WM_TIMER, PM_REMOVE);\r\n"
  1416. "\r\n"
  1417. "Submitted by Mike Mast. "
  1418. "\r\n"
  1419. "\r\n"
  1420. "\r\n"
  1421. "\0\0\0\0"
  1422. end
  1423.  
  1424. 54    RCDATA
  1425. begin
  1426.     "win31wh.hlp\0"
  1427.     "#54    DEVMODE (3.0)\0"
  1428.     "DEVMODE\0"
  1429.     "DEVMODE (3.0)\0"
  1430.  
  1431. "WDJ SDK Annotation #54"
  1432. "\r\n"
  1433. "\r\n"
  1434. "The documentation claims that DMCOLOR_COLOR is defined to be "
  1435. "1 and DMCOLOR_MONOCHROME is defined to be 2.  In fact, if "
  1436. "you look in print.h you discover that the reverse is true.  "
  1437. "\r\n"
  1438. "\r\n"
  1439. "Submitted by Bill Liu. "
  1440. "\r\n"
  1441. "\r\n"
  1442. "\r\n"
  1443. "\r\n"
  1444. "\0\0\0\0"
  1445. end
  1446.  
  1447. 55    RCDATA
  1448. begin
  1449.     "win31wh.hlp\0"
  1450.     "#55    EN_CHANGE (2.x)\0"
  1451.     "EN_CHANGE\0"
  1452.     "EN_CHANGE (2.x)\0"
  1453.  
  1454. "WDJ SDK Annotation #55"
  1455. "\r\n"
  1456. "\r\n"
  1457. "The documentation implies this notification only arises from "
  1458. "actions by the user.  In fact, this notification also arises "
  1459. "from programmatic changes, such as from sending a WM_SETTEXT "
  1460. "message to the edit control, or using SetWindowText() (which "
  1461. "sends a WM_SETTEXT message).  Not knowing this, you might "
  1462. "code an EN_CHANGE handler that attempts to modify the edit "
  1463. "control text, resulting in another EN_CHANGE notification -- "
  1464. "an infinite loop! "
  1465. "\r\n"
  1466. "\r\n"
  1467. "Submitted by Scott Smith. "
  1468. "\r\n"
  1469. "\r\n"
  1470. "\r\n"
  1471. "\0\0\0\0"
  1472. end
  1473.  
  1474. 56    RCDATA
  1475. begin
  1476.     "win31wh.hlp\0"
  1477.     "#56    EnumFonts (2.x)\0"
  1478.     "EnumFonts\0"
  1479.     "EnumFonts (2.x)\0"
  1480.  
  1481. "WDJ SDK Annotation #56"
  1482. "\r\n"
  1483. "\r\n"
  1484. "The 3.1 documentation for this function specifies that the "
  1485. "third argument is of type FONTENUMPROC.  This was true in "
  1486. "previous versions, but in 3.1 this call is deprecated in "
  1487. "favour of the new EnumFontFamilies() API function.  The "
  1488. "definition of the FONTENUMPROC type has been updated to take "
  1489. "a NEWTEXTMETRIC parameter, and therefore no longer quite "
  1490. "matches the prototype specified for EnumFonts.  Microsoft "
  1491. "provids a new type, OLDFONTENUMPROC, which corresponds to "
  1492. "the STRICT definition of EnumFonts in windows.h, but this is "
  1493. "not reflected in the documentation.  In other words, if you "
  1494. "compile with STRICT defined for Windows 3.1 and want to use "
  1495. "EnumFonts(), make sure the third parameter is of type "
  1496. "OLDFONTENUMPROC.  "
  1497. "\r\n"
  1498. "\r\n"
  1499. "Submitted by David W. Gillett. "
  1500. "\r\n"
  1501. "\r\n"
  1502. "\r\n"
  1503. "\0\0\0\0"
  1504. end
  1505.  
  1506. 57    RCDATA
  1507. begin
  1508.     "win31wh.hlp\0"
  1509.     "#57    PtInRect (2.x)\0"
  1510.     "PtInRect\0"
  1511.     "PtInRect (2.x)\0"
  1512.  
  1513. "WDJ SDK Annotation #57"
  1514. "\r\n"
  1515. "\r\n"
  1516. "There is no mention of this, but the rectangle MUST be "
  1517. "normailized before this function is called.  In other words, "
  1518. "you have to make sure that lprc->right is greater than "
  1519. "lprc->left, and that lrpc->bottom is greater than lrpc->top.  "
  1520. "Otherwise, the point will never be considered inside of the "
  1521. "rectangle.  By contrast, the function RectInRegion() does "
  1522. "accept and correctly handle all rectangles, whether "
  1523. "normalized or not.  "
  1524. "\r\n"
  1525. "\r\n"
  1526. "Submitted by Peter Ritchie. "
  1527. "\r\n"
  1528. "\r\n"
  1529. "\r\n"
  1530. "\0\0\0\0"
  1531. end
  1532.  
  1533. 58    RCDATA
  1534. begin
  1535.     "win31wh.hlp\0"
  1536.     "#58    SetTimer (2.x)\0"
  1537.     "SetTimer\0"
  1538.     "SetTimer (2.x)\0"
  1539.  
  1540. "WDJ SDK Annotation #58"
  1541. "\r\n"
  1542. "\r\n"
  1543. "The documentation makes it sound like Windows either posts a "
  1544. "message (if you supply no callback function) or else calls "
  1545. "your callback function directly when the timer expires.  In "
  1546. "fact, when the timer fires, Windows sets a bit in your "
  1547. "message queue which gets transformed into a WM_TIMER message "
  1548. "by either GetMessage() or PeekMessage() when they find no "
  1549. "other messages in the input queue.  The WM_TIMER message "
  1550. "contains the address of your callback function (if any), "
  1551. "which will be called by DefWindowProc() after the message is "
  1552. "dispatched to your window.  The key point here is that the "
  1553. "timers created by SetTimer() are always message based "
  1554. "(Windows does not call your timer procedure asynchronously) "
  1555. "and of a lower priority than any other Windows message.  "
  1556. "\r\n"
  1557. "\r\n"
  1558. "Submitted by Alan M. Carroll. "
  1559. "\r\n"
  1560. "\r\n"
  1561. "\r\n"
  1562. "\r\n"
  1563. "\0\0\0\0"
  1564. end
  1565.  
  1566. 59    RCDATA
  1567. begin
  1568.     "win31wh.hlp\0"
  1569.     "#59    lstrcpy (2.x)\0"
  1570.     "lstrcpy\0"
  1571.     "lstrcpy (2.x)\0"
  1572.  
  1573. "WDJ SDK Annotation #59"
  1574. "\r\n"
  1575. "\r\n"
  1576. "Believe it or not, this function (and apparently other "
  1577. "similar functions) examine the limit of the selector of the "
  1578. "output string, and even attempt to silently recover if the "
  1579. "operation causes a GP fault.  As a consequence, you should "
  1580. "not count on this function being a real speed demon.  "
  1581. "\r\n"
  1582. "\r\n"
  1583. "Submitted by Vivek Venugopalan "
  1584. "\r\n"
  1585. "\r\n"
  1586. "\0\0\0\0"
  1587. end
  1588.  
  1589. 60    RCDATA
  1590. begin
  1591.     "win31wh.hlp\0"
  1592.     "#60    GetModuleFileName (2.x)\0"
  1593.     "GetModuleFileName\0"
  1594.     "GetModuleFileName (2.x)\0"
  1595.  
  1596. "WDJ SDK Annotation #60"
  1597. "\r\n"
  1598. "\r\n"
  1599. "Windows 3.1 has a bug that causes this function to sometimes "
  1600. "return relative paths instead of absolute (fully qualified) "
  1601. "paths.This error occurs if a relative path is specified in "
  1602. "the PATH variable, and the DLL is implicitly loaded from "
  1603. "this directory.  For example, if the PATH variable is: "
  1604. "\r\n"
  1605. "\r\n"
  1606. "    PATH=C:\\DOS;D:.;C:\\UTILS\r\n"
  1607. "\r\n"
  1608. "and an application running from any other directory but "
  1609. "\042D:.\042, loads a DLL (test.dll) in \042D:.\042 implicitly (since it "
  1610. "is in the path), then a call to GetModuleFileName() with the "
  1611. "DLL instance will return \042D:.\\test.dll\042.  "
  1612. "\r\n"
  1613. "\r\n"
  1614. "Submitted by V. Ramachandran "
  1615. "Reference: MSKB PSS ID Number: Q85330. "
  1616. "\r\n"
  1617. "\r\n"
  1618. "\0\0\0\0"
  1619. end
  1620.  
  1621. 61    RCDATA
  1622. begin
  1623.     "win31wh.hlp\0"
  1624.     "#61    CB_GETDROPPEDCONTROLRECT (3.1)\0"
  1625.     "CB_GETDROPPEDCONTROLRECT\0"
  1626.     "CB_GETDROPPEDCONTROLRECT (3.1)\0"
  1627.  
  1628. "WDJ SDK Annotation #61"
  1629. "\r\n"
  1630. "\r\n"
  1631. "The documentation claims that this function retrieves the "
  1632. "screen coordinates of the listbox portion of a combo box.  "
  1633. "In fact, it retrieves the screen coordinates of the "
  1634. "rectangle that encloses the ENTIRE combo box in its "
  1635. "dropped-down state.  That means the rectangle retrieved is "
  1636. "both bit taller and a bit wider than the rectangle that the "
  1637. "help file claims is returned.  "
  1638. "\r\n"
  1639. "\r\n"
  1640. "Submitted by V. Ramachandran "
  1641. "\r\n"
  1642. "\r\n"
  1643. "\r\n"
  1644. "\0\0\0\0"
  1645. end
  1646.  
  1647. 62    RCDATA
  1648. begin
  1649.     "win31wh.hlp\0"
  1650.     "#62    NotifyUnRegister (3.1)\0"
  1651.     "NotifyUnRegister\0"
  1652.     "NotifyUnRegister (3.1)\0"
  1653.  
  1654. "WDJ SDK Annotation #62"
  1655. "\r\n"
  1656. "\r\n"
  1657. "As the documentation says, you can set the htask argument to "
  1658. "NULL to refer to the current task.  This is probably not a "
  1659. "good practice, however.  If more than one application can "
  1660. "load your DLL, then there is typically some scenario under "
  1661. "which the task that you called NotifyRegister() for has died "
  1662. "before you call NotifyUnRegister(), in which case passing "
  1663. "NULL would refer to the wrong task.  It's probably safer to "
  1664. "explicitly store that task that was passed to "
  1665. "NotifyRegister() and make sure you pass the same task to "
  1666. "NotifyUnregister().  "
  1667. "\r\n"
  1668. "\r\n"
  1669. "Submitted by Paul Dolphin. "
  1670. "\r\n"
  1671. "\r\n"
  1672. "\r\n"
  1673. "\0\0\0\0"
  1674. end
  1675.  
  1676. 63    RCDATA
  1677. begin
  1678.     "win31wh.hlp\0"
  1679.     "#63    CreateCompatibleDC (2.x)\0"
  1680.     "CreateCompatibleDC\0"
  1681.     "CreateCompatibleDC (2.x)\0"
  1682.  
  1683. "WDJ SDK Annotation #63"
  1684. "\r\n"
  1685. "\r\n"
  1686. "You might think from the name that this function returns a "
  1687. "device context whose attributes are the same as the source "
  1688. "device context.  In fact, attributes such as the mapping "
  1689. "mode will be set to their defaults (e.g., the mapping mode "
  1690. "will always be MM_TEXT) in the returned device context, not "
  1691. "to the attribute values of the source device context.  "
  1692. "\r\n"
  1693. "\r\n"
  1694. "Submitted by Stuart Patterson\r\n"
  1695. "Reference: p.  624, \042Programming Windows 3.1, 3rd Edition\042, "
  1696. "by Charles Petzold "
  1697. "\r\n"
  1698. "\r\n"
  1699. "\r\n"
  1700. "\r\n"
  1701. "\0\0\0\0"
  1702. end
  1703.  
  1704. 64    RCDATA
  1705. begin
  1706.     "win31wh.hlp\0"
  1707.     "#64    Device Contexts\0"
  1708.     "Device Contexts\0"
  1709.     "Device Contexts\0"
  1710.  
  1711. "WDJ SDK Annotation #64"
  1712. "\r\n"
  1713. "\r\n"
  1714. "The help file says CreateCompatibleDC() creates a device "
  1715. "context that \042has the same attributes\042 as the source device "
  1716. "context.  In fact, the device context's attributes (such as "
  1717. "mapping mode) will have their default values, no matter what "
  1718. "value they had in the source device context.  "
  1719. "\r\n"
  1720. "\r\n"
  1721. "Submitted by Stuart Patterson\r\n"
  1722. "Reference: p.  624, \042Programming Windows 3.1, 3rd Edition\042, "
  1723. "by Charles Petzold "
  1724. "\r\n"
  1725. "\r\n"
  1726. "\0\0\0\0"
  1727. end
  1728.  
  1729. 65    RCDATA
  1730. begin
  1731.     "win31wh.hlp\0"
  1732.     "#65    UngetCommChar (2.x)\0"
  1733.     "UngetCommChar\0"
  1734.     "UngetCommChar (2.x)\0"
  1735.  
  1736. "WDJ SDK Annotation #65"
  1737. "\r\n"
  1738. "\r\n"
  1739. "Do not use this function under Windows 3.1 -- it causes lost "
  1740. "characters or even GP faults! "
  1741. "\r\n"
  1742. "\r\n"
  1743. "Submitted by Manfred Keul.\r\n"
  1744. "Reference: Microsoft Knowledge Base article Q100183. "
  1745. "\r\n"
  1746. "\r\n"
  1747. "\r\n"
  1748. "\r\n"
  1749. "\0\0\0\0"
  1750. end
  1751.  
  1752. 66    RCDATA
  1753. begin
  1754.     "win31wh.hlp\0"
  1755.     "#66    TabbedTextOut (3.0)\0"
  1756.     "TabbedTextOut\0"
  1757.     "TabbedTextOut (3.0)\0"
  1758.  
  1759. "WDJ SDK Annotation #66"
  1760. "\r\n"
  1761. "\r\n"
  1762. "If a tab character is the last character in the string, then "
  1763. "all of the area to the next tab stop is filled with the "
  1764. "current background color.  This may or may not be the "
  1765. "behavior you want in any given situation.  "
  1766. "\r\n"
  1767. "\r\n"
  1768. "Submitted by Tim English. "
  1769. "\r\n"
  1770. "\r\n"
  1771. "\0\0\0\0"
  1772. end
  1773.  
  1774. 67    RCDATA
  1775. begin
  1776.     "win31wh.hlp\0"
  1777.     "#67    GetRgnBox (3.0)\0"
  1778.     "GetRgnBox\0"
  1779.     "GetRgnBox (3.0)\0"
  1780.  
  1781. "WDJ SDK Annotation #67"
  1782. "\r\n"
  1783. "\r\n"
  1784. "The documentation claims GetRgnBox() returns COMPLEXREGION "
  1785. "when the region has overlapping borders.  In fact, "
  1786. "GetRgnBox() apparently returns COMPLEXREGION if the region "
  1787. "is simply non-rectangular, whether overlapping borders are "
  1788. "involved or not.  "
  1789. "\r\n"
  1790. "\r\n"
  1791. "Submitted by Jason Douglas. "
  1792. "\r\n"
  1793. "\r\n"
  1794. "\0\0\0\0"
  1795. end
  1796.  
  1797. 68    RCDATA
  1798. begin
  1799.     "win31wh.hlp\0"
  1800.     "#68    DRAWITEMSTRUCT (3.0)\0"
  1801.     "DRAWITEMSTRUCT\0"
  1802.     "DRAWITEMSTRUCT (3.0)\0"
  1803.  
  1804. "WDJ SDK Annotation #68"
  1805. "\r\n"
  1806. "\r\n"
  1807. "The itemID field in this structure is set to a negative value "
  1808. "for an empty listbox or combobox.  Watch out, though -- since "
  1809. "this field is defined to be unsigned (UINT), a statement like "
  1810. "this: "
  1811. "\r\n"
  1812. "\r\n"
  1813. "    if(lpdis->itemID >= 0) // if listbox not empty\r\n"
  1814. "        // ... some code\r\n"
  1815. "\r\n"
  1816. "will always evaluate true.  To check for an empty listbox or "
  1817. "combobox, either cast the field to int or check the high bit: "
  1818. "\r\n"
  1819. "\r\n"
  1820. "    if( (int) lpdis->itemID  >= 0)  // this works correctly\r\n"
  1821. "        //... some code\r\n"
  1822. "\r\n"
  1823. "Submitted by Aaron O'Neil. "
  1824. "\r\n"
  1825. "\r\n"
  1826. "\r\n"
  1827. "\0\0\0\0"
  1828. end
  1829.  
  1830. 69    RCDATA
  1831. begin
  1832.     "win31wh.hlp\0"
  1833.     "#69    DDEDATA (2.x)\0"
  1834.     "DDEDATA\0"
  1835.     "DDEDATA (2.x)\0"
  1836.  
  1837. "WDJ SDK Annotation #69"
  1838. "\r\n"
  1839. "\r\n"
  1840. "In this help topic, the description for the fResponse field "
  1841. "actually describes the fAckReq field, and vice versa.  "
  1842. "\r\n"
  1843. "\r\n"
  1844. "Submitted by Sudhir Menon.\r\n"
  1845. "Reference: Microsoft Knowledge Base article Q93372. "
  1846. "\r\n"
  1847. "\r\n"
  1848. "\0\0\0\0"
  1849. end
  1850.  
  1851. 70    RCDATA
  1852. begin
  1853.     "win31wh.hlp\0"
  1854.     "#70    EnableCommNotification (3.1)\0"
  1855.     "EnableCommNotification\0"
  1856.     "EnableCommNotification (3.1)\0"
  1857.  
  1858. "WDJ SDK Annotation #70"
  1859. "\r\n"
  1860. "\r\n"
  1861. "Due to bugs in Windows 3.1, you will probably want to always set "
  1862. "both cbWriteNotify and cbOutQueue to -1, thus disabling the "
  1863. "CN_TRANSMIT and CN_RECEIVE notifications.  If you do not set "
  1864. "them to -1, spurious WM_COMMNOTIFY messages can be sent, "
  1865. "resulting in a system crash at higher baud rates.  "
  1866. "\r\n"
  1867. "\r\n"
  1868. "Submitted by Manfred Keul.\r\n"
  1869. "Reference: Microsoft Knowledge Base article Q101420. "
  1870. "\r\n"
  1871. "\r\n"
  1872. "\r\n"
  1873. "\r\n"
  1874. "\0\0\0\0"
  1875. end
  1876.  
  1877. 71    RCDATA
  1878. begin
  1879.     "win31wh.hlp\0"
  1880.     "#71    GetMsgProc (3.1)\0"
  1881.     "GetMsgProc\0"
  1882.     "GetMsgProc (3.1)\0"
  1883.  
  1884. "WDJ SDK Annotation #71"
  1885. "\r\n"
  1886. "\r\n"
  1887. "The help file fails to mention that your hook function gets "
  1888. "called by PeekMessage(), not just by GetMessage().  The "
  1889. "documentation also contradicts itself, saying first that wParam "
  1890. "is undefined and later saying that wParam is NULL.  The "
  1891. "Microsoft Knowledge Base, on the other hand, reveals that wParam "
  1892. "contains the PM_ flags that were used in the call to "
  1893. "PeekMessage(), so your message hook can, for example, determine "
  1894. "if the message was being removed or not with code like this: "
  1895. "\r\n"
  1896. "\r\n"
  1897. "    if(wParam & PM_REMOVE)\r\n"
  1898. "        //... then message is being removed\r\n"
  1899. "    else\r\n"
  1900. "        //... message is not being removed\r\n"
  1901. "\r\n"
  1902. "Note that your hook may want to ignore the message if it is not "
  1903. "being removed, since your hook will get called again when the "
  1904. "same message is removed by some future call to GetMessage() or "
  1905. "PeekMessage().  "
  1906. "\r\n"
  1907. "\r\n"
  1908. "Submitted by V. Ramachandran.\r\n"
  1909. "Reference: Microsoft Knowledge Base article Q104068 "
  1910. "\r\n"
  1911. "\r\n"
  1912. "\r\n"
  1913. "\0\0\0\0"
  1914. end
  1915.  
  1916. 72    RCDATA
  1917. begin
  1918.     "win31wh.hlp\0"
  1919.     "#72    GetInstanceData (2.x)\0"
  1920.     "GetInstanceData\0"
  1921.     "GetInstanceData (2.x)\0"
  1922.  
  1923. "WDJ SDK Annotation #72"
  1924. "\r\n"
  1925. "\r\n"
  1926. "Both the documentation and windows.h declare the second "
  1927. "parameter as a BYTE*.  Unfortunately, that declaration is only "
  1928. "correct if you are using a memory model with near data (small or "
  1929. "medium memory models), and will be incorrect for large or huge "
  1930. "memory models.  The correct declaration for this argument is "
  1931. "BYTE NEAR*.  "
  1932. "\r\n"
  1933. "\r\n"
  1934. "Submitted by Martin Cooper. "
  1935. "\r\n"
  1936. "\r\n"
  1937. "\r\n"
  1938. "\0\0\0\0"
  1939. end
  1940.  
  1941. 73    RCDATA
  1942. begin
  1943.     "win31wh.hlp\0"
  1944.     "#73    MENUITEMTEMPLATE (3.0)\0"
  1945.     "MENUITEMTEMPLATE\0"
  1946.     "MENUITEMTEMPLATE (3.0)\0"
  1947.  
  1948. "WDJ SDK Annotation #73"
  1949. "\r\n"
  1950. "\r\n"
  1951. "Missing from the list of bits you can turn on in mtOption is "
  1952. "MF_END (0x0080), which indicates that the item terminates "
  1953. "the menu. "
  1954. "\r\n"
  1955. "\r\n"
  1956. "Submitted by V. Ramachandran. "
  1957. "\r\n"
  1958. "\r\n"
  1959. "\r\n"
  1960. "\r\n"
  1961. "\0\0\0\0"
  1962. end
  1963.  
  1964. 74    RCDATA
  1965. begin
  1966.     "win31wh.hlp\0"
  1967.     "#74    AddAtom (2.x)\0"
  1968.     "AddAtom\0"
  1969.     "AddAtom (2.x)\0"
  1970.  
  1971. "WDJ SDK Annotation #74"
  1972. "\r\n"
  1973. "\r\n"
  1974. "AddAtom() handles strings that begin with \042#\042 specially: "
  1975. "it expects the string following the \042#\042 to be a string "
  1976. "of digits, and returns an atom is value is the 16-bit "
  1977. "binary representation of that string of digits. Unfortunately, "
  1978. "if your first call to AddAtom() is with a string like \042#nondigits\042, "
  1979. "it will produce a divide by zero fault. Two workarounds "
  1980. "are possible: either make sure your first call to AddAtom() "
  1981. "does not contain such a string, or call InitAtomTable() "
  1982. "before calling AddAtom() for the first time. "
  1983. "\r\n"
  1984. "\r\n"
  1985. "Submitted by V. Ramachandran.\r\n"
  1986. "Reference: MSKB PSS ID Number: Q103036 "
  1987. "\r\n"
  1988. "\r\n"
  1989. "\r\n"
  1990. "\0\0\0\0"
  1991. end
  1992.  
  1993. 75    RCDATA
  1994. begin
  1995.     "win31wh.hlp\0"
  1996.     "#75    DCB (2.x)\0"
  1997.     "DCB\0"
  1998.     "DCB (2.x)\0"
  1999.  
  2000. "WDJ SDK Annotation #75"
  2001. "\r\n"
  2002. "\r\n"
  2003. "When setting the BaudRate field, do not use the constant "
  2004. "CBR_14400; Windows 3.1's COMM.DRV has a bug that will produce "
  2005. "communications problems due to a bad table entry for that "
  2006. "constant.  Instead, set BaudRate to the integer 14400 to "
  2007. "communicate at 14400 baud.  "
  2008. "\r\n"
  2009. "\r\n"
  2010. "Submitted by Manfred Keul.\r\n"
  2011. "Reference: Microsoft Knowledge Base article Q83232. "
  2012. "\r\n"
  2013. "\r\n"
  2014. "\r\n"
  2015. "\0\0\0\0"
  2016. end
  2017.  
  2018. 76    RCDATA
  2019. begin
  2020.     "win31wh.hlp\0"
  2021.     "#76    RegisterRoutine WinHelp macro\0"
  2022.     "RegisterRoutine WinHelp macro\0"
  2023.     "RegisterRoutine WinHelp macro\0"
  2024.  
  2025. "WDJ SDK Annotation #76"
  2026. "\r\n"
  2027. "\r\n"
  2028. "The documentation does not reveal how to specify the return type "
  2029. "of the function. You do this by inserting a type-specifying "
  2030. "character followed by an equal sign in the third parameter "
  2031. "string. For example, to register FindWindow() (which takes "
  2032. "two far strings and returns a 16-bit unsigned integer), you "
  2033. "might use: "
  2034. "\r\n"
  2035. "\r\n"
  2036. "    RR(\042USER\042, \042FindWindow\042, \042u=SS\042);\r\n"
  2037. "\r\n"
  2038. "Note that if you do not specify a return type when you register "
  2039. "a function, you cannot use that function in an IfThen or "
  2040. "IfThenElse macro. "
  2041. "\r\n"
  2042. "\r\n"
  2043. "Submitted by Sudhir Menon. "
  2044. "\r\n"
  2045. "\r\n"
  2046. "\0\0\0\0"
  2047. end
  2048.  
  2049. 77    RCDATA
  2050. begin
  2051.     "win31wh.hlp\0"
  2052.     "#77    RTF Tokens\0"
  2053.     "RTF Tokens\0"
  2054.     "RTF Tokens\0"
  2055.  
  2056. "WDJ SDK Annotation #77"
  2057. "\r\n"
  2058. "\r\n"
  2059. "Strangely, the tokens \042emc\042, \042eml\042, and \042emr\042 are "
  2060. "misspelled in the online help -- they should be "
  2061. "\042ewc\042, \042ewl\042, and \042ewr\042, where the \042ew\042 stands for "
  2062. "Embedded Window. Note that this are not really RTF "
  2063. "tokens, but literal text. The help compiler scans "
  2064. "for any text you have entered of the form \042{ewx commands}\042 "
  2065. "in order to detect embedded window commands. Such text, "
  2066. "when translated by your word processor into RTF, looks "
  2067. "like this: \042\\{ewx commands\\}\042. "
  2068. "\r\n"
  2069. "\r\n"
  2070. "Submitted by John Sawyer. "
  2071. "\r\n"
  2072. "\r\n"
  2073. "\r\n"
  2074. "\0\0\0\0"
  2075. end
  2076.  
  2077. 78    RCDATA
  2078. begin
  2079.     "win31wh.hlp\0"
  2080.     "#78    WM_ENTERIDLE (2.x)\0"
  2081.     "WM_ENTERIDLE\0"
  2082.     "WM_ENTERIDLE (2.x)\0"
  2083.  
  2084. "WDJ SDK Annotation #78"
  2085. "\r\n"
  2086. "\r\n"
  2087. "Note that you can elect to suppress the WM_ENTERIDLE "
  2088. "message for a particular modal dialog box by defining "
  2089. "it with the DS_NOIDLEMSG window style bit. "
  2090. "\r\n"
  2091. "\r\n"
  2092. "Submitted by V. Ramachandran. "
  2093. "\r\n"
  2094. "\r\n"
  2095. "\r\n"
  2096. "\0\0\0\0"
  2097. end
  2098.  
  2099. 79    RCDATA
  2100. begin
  2101.     "win31wh.hlp\0"
  2102.     "#79    WM_SYSCOMMAND (2.x)\0"
  2103.     "WM_SYSCOMMAND\0"
  2104.     "WM_SYSCOMMAND (2.x)\0"
  2105.  
  2106. "WDJ SDK Annotation #79"
  2107. "\r\n"
  2108. "\r\n"
  2109. "You can use this message with SC_MENUKEY to simulate the "
  2110. "user selecting a menu with an accelerator key.  For example, "
  2111. "to simulate the user accessing the \042File\042 menu, you might "
  2112. "use the following code: "
  2113. "\r\n"
  2114. "\r\n"
  2115. "PostMessage(hWnd, WM_SYSCOMMAND, SC_MENUKEY, MAKELPARAM('f',0)); "
  2116. "\r\n"
  2117. "\r\n"
  2118. "Submitted by Jay Giganti. "
  2119. "\r\n"
  2120. "\r\n"
  2121. "\r\n"
  2122. "\0\0\0\0"
  2123. end
  2124.  
  2125. 80    RCDATA
  2126. begin
  2127.     "win31wh.hlp\0"
  2128.     "#80    wsprintf\0"
  2129.     "wsprintf\0"
  2130.     "wsprintf\0"
  2131.  
  2132. "WDJ SDK Annotation #80"
  2133. "\r\n"
  2134. "\r\n"
  2135. "The documentation says the second parameter is an LPSTR, "
  2136. "but it is actually an LPCSTR (and so declared in windows.h), "
  2137. "so it's safe to use a string constant. "
  2138. "\r\n"
  2139. "\r\n"
  2140. "Submitted by: V. Ramachandran. "
  2141. "\r\n"
  2142. "\r\n"
  2143. "\r\n"
  2144. "\0\0\0\0"
  2145. end
  2146.  
  2147. 81    RCDATA
  2148. begin
  2149.     "win31wh.hlp\0"
  2150.     "#81    _lread (2.x)\0"
  2151.     "_lread\0"
  2152.     "_lread (2.x)\0"
  2153.  
  2154. "WDJ SDK Annotation #81"
  2155. "\r\n"
  2156. "\r\n"
  2157. "If you call _lread() to read a floppy when there is no "
  2158. "diskette in the drive, Windows puts up a system error "
  2159. "message box (\042Cannot Read from Drive...\042) with Retry and "
  2160. "Cancel buttons.  If the user presses the Cancel button, "
  2161. "_lread() returns a non-negative number, indicating success.  "
  2162. "It should return HFILE_ERROR instead.  "
  2163. "\r\n"
  2164. "\r\n"
  2165. "To avoid this error, call SetErrorMode(SEM_NOOPENFILEERRORBOX) "
  2166. "before calling _lread(), then it will correctly return -1 on "
  2167. "failure.  "
  2168. "\r\n"
  2169. "\r\n"
  2170. "Submitted by: V. Ramachandran.\r\n"
  2171. "Reference: MSDN PSS ID No. Q111587. "
  2172. "\r\n"
  2173. "\r\n"
  2174. "\r\n"
  2175. "\0\0\0\0"
  2176. end
  2177.  
  2178. 82    RCDATA
  2179. begin
  2180.     "win31wh.hlp\0"
  2181.     "#82    WM_COMPAREITEM (3.0)\0"
  2182.     "WM_COMPAREITEM\0"
  2183.     "WM_COMPAREITEM (3.0)\0"
  2184.  
  2185. "WDJ SDK Annotation #82"
  2186. "\r\n"
  2187. "\r\n"
  2188. "The documentation for WM_COMPAREITEM says that the parent of "
  2189. "owner-drawn listboxes with the LBS_SORT (or CBS_SORT) styles "
  2190. "will get this message in order to determine the relative "
  2191. "position.  However, Windows will not send the WM_COMPAREITEM "
  2192. "message if the LBS_HASSTRINGS style bit is set, even if it "
  2193. "is an owner-drawn listbox with the LBS_SORT style. The same "
  2194. "is true for comboboxes. "
  2195. "\r\n"
  2196. "\r\n"
  2197. "Submitted by: V. Ramachandran. "
  2198. "\r\n"
  2199. "\r\n"
  2200. "\r\n"
  2201. "\0\0\0\0"
  2202. end
  2203.  
  2204. 83    RCDATA
  2205. begin
  2206.     "win31wh.hlp\0"
  2207.     "#83    DOCINFO (3.1)\0"
  2208.     "DOCINFO\0"
  2209.     "DOCINFO (3.1)\0"
  2210.  
  2211. "WDJ SDK Annotation #83"
  2212. "\r\n"
  2213. "\r\n"
  2214. "The documentation fails to point out that lpszOutput is "
  2215. "limited to 32 characters, including the null terminating "
  2216. "byte.  If you use a string longer than that, the trailing "
  2217. "characters will be ignored.  For example, if you use a "
  2218. "string containing the too-long path: "
  2219. "\r\n"
  2220. "\r\n"
  2221. "    c:\\usr\\ts\\issues\\pending\\12345678\\abcdefgh.out\r\n"
  2222. "\r\n"
  2223. "the actual file that gets created will be: "
  2224. "\r\n"
  2225. "\r\n"
  2226. "    c:\\usr\\ts\\issues\\pending\\123456\r\n"
  2227. "\r\n"
  2228. "Submitted by V. Ramachandran. "
  2229. "\r\n"
  2230. "\r\n"
  2231. "\r\n"
  2232. "\r\n"
  2233. "\r\n"
  2234. "\0\0\0\0"
  2235. end
  2236.  
  2237. 84    RCDATA
  2238. begin
  2239.     "win31wh.hlp\0"
  2240.     "#84    SetAbortProc function\0"
  2241.     "SetAbortProc\0"
  2242.     "SetAbortProc function\0"
  2243.  
  2244. "WDJ SDK Annotation #84"
  2245. "\r\n"
  2246. "\r\n"
  2247. "\r\n"
  2248. "SetAbortProc() returns a negative value, which is documented "
  2249. "as indicating failure.  However, the return value from "
  2250. "SetAbortProc does not indicate success or failure of the "
  2251. "function, so don't depend on the return value for anything. "
  2252. "\r\n"
  2253. "\r\n"
  2254. "Submitted by:    V. Ramachandran.\r\n"
  2255. "Reference:    MSDN PSS ID No. Q109540. "
  2256. "\r\n"
  2257. "\r\n"
  2258. "\r\n"
  2259. "\0\0\0\0"
  2260. end
  2261.  
  2262. 85    RCDATA
  2263. begin
  2264.     "win31wh.hlp\0"
  2265.     "#85    BN_DISABLE (2.x)\0"
  2266.     "BN_DISABLE\0"
  2267.     "BN_DISABLE (2.x)\0"
  2268.  
  2269. "WDJ SDK Annotation #85"
  2270. "\r\n"
  2271. "\r\n"
  2272. "The documentation claims the button sends this notification "
  2273. "whenever it gets disabled. In fact, Windows 3.1 buttons do "
  2274. "not appear to ever send this notification! "
  2275. "\r\n"
  2276. "\r\n"
  2277. "Submitted by: V. Ramachandran. "
  2278. "\r\n"
  2279. "\r\n"
  2280. "\r\n"
  2281. "\r\n"
  2282. "\r\n"
  2283. "\r\n"
  2284. "\r\n"
  2285. "\0\0\0\0"
  2286. end
  2287.  
  2288. 86    RCDATA
  2289. begin
  2290.     "win31wh.hlp\0"
  2291.     "#86    BN_DOUBLECLICKED (2.x)\0"
  2292.     "BN_DOUBLECLICKED\0"
  2293.     "BN_DOUBLECLICKED (2.x)\0"
  2294.  
  2295. "WDJ SDK Annotation #86"
  2296. "\r\n"
  2297. "\r\n"
  2298. "The documentation fails to point out that this notification "
  2299. "is only sent for buttons that have the BS_OWNERDRAW or "
  2300. "BS_RADIOBUTTON styles. No other types of buttons generate "
  2301. "this notification "
  2302. "\r\n"
  2303. "\r\n"
  2304. "Submitted by: V. Ramachandran. "
  2305. "\r\n"
  2306. "\r\n"
  2307. "\r\n"
  2308. "\r\n"
  2309. "\0\0\0\0"
  2310. end
  2311.  
  2312. 87    RCDATA
  2313. begin
  2314.     "win31wh.hlp\0"
  2315.     "#87    WM_DROPFILES (3.1)\0"
  2316.     "WM_DROPFILES\0"
  2317.     "WM_DROPFILES (3.1)\0"
  2318.  
  2319. "WDJ SDK Annotation #87"
  2320. "\r\n"
  2321. "\r\n"
  2322. "Documentation for the undocumented handle has since been "
  2323. "published by Microsoft in Microsoft Systems Journal.  This "
  2324. "handle points to a structure like this: "
  2325. "\r\n"
  2326. "\r\n"
  2327. "typedef struct {\r\n"
  2328. "    int     wSize;          // Number of bytes in this structure\r\n"
  2329. "    POINT   ptMousePos;     // Mouse position\r\n"
  2330. "    BOOL    fInNonClientArea;// TRUE if mouse was in client area\r\n"
  2331. "    // Pathnames begin after structure each one zero-terminated\r\n"
  2332. "    // Zero-length pathname used to indicate the end\r\n"
  2333. "} DROPFILESTRUCT, FAR *LPDROPFILESTRUCT;\r\n"
  2334. "\r\n"
  2335. "The Win32 version of this structure is slightly different.  The "
  2336. "first field becomes a 4-byte rather than a 2-byte integer, and "
  2337. "the structure contains an additional BOOL field at the end that "
  2338. "is TRUE if the pathnames are in Unicode rather than ANSI "
  2339. "strings.  "
  2340. "\r\n"
  2341. "\r\n"
  2342. "Submitted by V. Ramachandran.\r\n"
  2343. "Reference:  May/June 1992 Microsoft Systems Journal\r\n"
  2344. "            February 1994 Microsoft Systems Journal\r\n"
  2345. "\r\n"
  2346. "\r\n"
  2347. "\r\n"
  2348. "\r\n"
  2349. "\0\0\0\0"
  2350. end
  2351.  
  2352. 88    RCDATA
  2353. begin
  2354.     "win32.hlp\0"
  2355.     "#87    WM_DROPFILES\0"
  2356.     "WM_DROPFILES AND Parameters\0"
  2357.     "WM_DROPFILES\0"
  2358.  
  2359. "WDJ SDK Annotation #87"
  2360. "\r\n"
  2361. "\r\n"
  2362. "Documentation for the undocumented handle has since been "
  2363. "published by Microsoft in Microsoft Systems Journal.  This "
  2364. "handle points to a structure like this: "
  2365. "\r\n"
  2366. "\r\n"
  2367. "typedef struct {\r\n"
  2368. "    int     wSize;          // Number of bytes in this structure\r\n"
  2369. "    POINT   ptMousePos;     // Mouse position\r\n"
  2370. "    BOOL    fInNonClientArea;// TRUE if mouse was in client area\r\n"
  2371. "    // Pathnames begin after structure each one zero-terminated\r\n"
  2372. "    // Zero-length pathname used to indicate the end\r\n"
  2373. "} DROPFILESTRUCT, FAR *LPDROPFILESTRUCT;\r\n"
  2374. "\r\n"
  2375. "The Win32 version of this structure is slightly different.  The "
  2376. "first field becomes a 4-byte rather than a 2-byte integer, and "
  2377. "the structure contains an additional BOOL field at the end that "
  2378. "is TRUE if the pathnames are in Unicode rather than ANSI "
  2379. "strings.  "
  2380. "\r\n"
  2381. "\r\n"
  2382. "Submitted by V. Ramachandran.\r\n"
  2383. "Reference:  May/June 1992 Microsoft Systems Journal\r\n"
  2384. "            February 1994 Microsoft Systems Journal\r\n"
  2385. "\r\n"
  2386. "\r\n"
  2387. "\r\n"
  2388. "\0\0\0\0"
  2389. end
  2390.  
  2391. 89    RCDATA
  2392. begin
  2393.     "win31wh.hlp\0"
  2394.     "#88    List box messages \0"
  2395.     "List box messages \0"
  2396.     "List box messages \0"
  2397.  
  2398. "WDJ SDK Annotation #88"
  2399. "\r\n"
  2400. "\r\n"
  2401. "Internally, listboxes maintain two 32-bit DWORDs for each "
  2402. "listbox item.  The first DWORD points to the text for the item "
  2403. "and the second DWORD contains whatever custom data you would "
  2404. "like; you can get it via LB_GETITEMDATA or set it via "
  2405. "LB_SETITEMDATA.  Some messages refer to one or the other of "
  2406. "these DWORDs, depending on whether the LBS_HASSTRINGS style is "
  2407. "set: "
  2408. "\r\n"
  2409. "\r\n"
  2410. "Message             LBS_HASSTRINGS?   Refers to:\r\n"
  2411. "==========================================================\r\n"
  2412. "LB_ADDSTRING        Yes             text pointer (lParam)\r\n"
  2413. "LB_ADDSTRING        No              custom data  (lParam)\r\n"
  2414. "LB_INSERTSTRING     Yes             text pointer (lParam)\r\n"
  2415. "LB_INSERTSTRING     No              custom data  (lParam)\r\n"
  2416. "LB_GETTEXT          Yes             returns text pointer\r\n"
  2417. "LB_GETTEXT          No              returns custom data\r\n"
  2418. "LB_GETITEMDATA      either          returns custom data\r\n"
  2419. "LB_SETITEMDATA      either          sets custom data (lParam)\r\n"
  2420. "WM_DRAWITEM         either          custom data (in itemData field)\r\n"
  2421. "\r\n"
  2422. "In other words, if LBS_HASSTRINGS is not set, you cannot access "
  2423. "the normal text pointer -- all messages operate on the custom "
  2424. "data.  But if LBS_HASSTRINGS is set, you can access both the "
  2425. "normal text as well as the extra DWORD of custom data.  "
  2426. "\r\n"
  2427. "\r\n"
  2428. "Submitted by V. Ramachandran "
  2429. "\r\n"
  2430. "\r\n"
  2431. "\r\n"
  2432. "\0\0\0\0"
  2433. end
  2434.  
  2435. 90    RCDATA
  2436. begin
  2437.     "win31wh.hlp\0"
  2438.     "#89    SetTimer (2.x)\0"
  2439.     "SetTimer\0"
  2440.     "SetTimer (2.x)\0"
  2441.  
  2442. "WDJ SDK Annotation #89"
  2443. "\r\n"
  2444. "\r\n"
  2445. "Though the documentation does not mention this, you can "
  2446. "change the timer interval after you create the timer.  If "
  2447. "you call SetTimer() with a window handle and a timer ID "
  2448. "equal to an existing timer and specify a different time "
  2449. "interval, SetTimer() updates the timer to the new time "
  2450. "interval.  "
  2451. "\r\n"
  2452. "\r\n"
  2453. "Example: "
  2454. "\r\n"
  2455. "\r\n"
  2456. "Use the following line to set a timer to a particular time "
  2457. "interval.  "
  2458. "\r\n"
  2459. "\r\n"
  2460. "UINT nTimerID = SetTimer (hWnd, TIMER_ID, TIME_INTERVAL, NULL) "
  2461. "\r\n"
  2462. "\r\n"
  2463. "Calling the following line will reset the timer to twice the "
  2464. "time interval.  "
  2465. "\r\n"
  2466. "\r\n"
  2467. "nTimerID = SetTimer (hWnd, TIMER_ID, 2*TIME_INTERVAL, NULL) "
  2468. "\r\n"
  2469. "\r\n"
  2470. "Submitted by V. Ramachandran. "
  2471. "\r\n"
  2472. "\r\n"
  2473. "\r\n"
  2474. "\0\0\0\0"
  2475. end
  2476.  
  2477. 91    RCDATA
  2478. begin
  2479.     "win31wh.hlp\0"
  2480.     "#90    TranslateAccelerator (2.x)\0"
  2481.     "TranslateAccelerator\0"
  2482.     "TranslateAccelerator (2.x)\0"
  2483.  
  2484. "WDJ SDK Annotation #90"
  2485. "\r\n"
  2486. "\r\n"
  2487. "Contrary to the documentation, both WM_INITMENU and "
  2488. "WM_INITMENUPOPUP get sent, even if the menu item is disabled, "
  2489. "and even if the window is minimized and the keystroke matches no "
  2490. "menu items.  "
  2491. "\r\n"
  2492. "\r\n"
  2493. "Submitted by V. Ramachandran. "
  2494. "\r\n"
  2495. "\r\n"
  2496. "\r\n"
  2497. "\0\0\0\0"
  2498. end
  2499.  
  2500. 92    RCDATA
  2501. begin
  2502.     "win31wh.hlp\0"
  2503.     "#91    GetPrivateProfileInt (3.0)\0"
  2504.     "GetPrivateProfileInt\0"
  2505.     "GetPrivateProfileInt (3.0)\0"
  2506.  
  2507. "WDJ SDK Annotation #91"
  2508. "\r\n"
  2509. "\r\n"
  2510. "The documentation says you must use a positive integer "
  2511. "in the range 0 through 32,767 (0x7FFF) for the third "
  2512. "argument, which is the default value the function returns "
  2513. "if it cannot locate the desired entry in the .ini file. "
  2514. "In fact, you can pass any legal integer value for this "
  2515. "parameter -- it's just that since the function's return "
  2516. "type is defined to be UINT, you must cast the result to "
  2517. "int if you want to treat the result as a negative number. "
  2518. "For example, the following code works correctly, despite "
  2519. "what the documentation says: "
  2520. "\r\n"
  2521. "\r\n"
  2522. " int Val = (int)GetPrivateProfileInt(\r\n"
  2523. "     \042MyLib\042, \042Debug\042, -1, \042MyLib.ini\042);\r\n"
  2524. " if(Val == -1)\r\n"
  2525. "     /* then no such entry found */\r\n"
  2526. "\r\n"
  2527. "\r\n"
  2528. "\0\0\0\0"
  2529. end
  2530.  
  2531. 93    RCDATA
  2532. begin
  2533.     "win32.hlp\0"
  2534.     "#92    WM_NOTIFY\0"
  2535.     "WM_NOTIFY AND \042See also\042\0"
  2536.     "WM_NOTIFY\0"
  2537.  
  2538. "WDJ SDK Annotation #92"
  2539. "\r\n"
  2540. "\r\n"
  2541. "If your dialog procedure handles a WM_NOTIFY that requires a "
  2542. "return value, note that you MUST both return a non-zero "
  2543. "value (to indicate to the dialog manager that you wish to "
  2544. "specify a return value for the message) AND store the "
  2545. "desired return value for the message in the window field "
  2546. "DWL_MSGRESULT.  The standard Windows header file windowsx.h "
  2547. "provides a macro called SetDlgMsgResult() that makes this "
  2548. "easy: "
  2549. "\r\n"
  2550. "\r\n"
  2551. " #include <windowsx.h>\r\n"
  2552. " //...\r\n"
  2553. " case WM_NOTIFY  :\r\n"
  2554. "     {\r\n"
  2555. "     NMHDR* Head = (NMHDR*)lParam;\r\n"
  2556. "     if(Head->code == LVN_ENDLABELEDIT)\r\n"
  2557. "         // allow user to edit listview labels\r\n"
  2558. "         return SetDlgMsgResult(Dialog, WM_NOTIFY, TRUE);\r\n"
  2559. "     }\r\n"
  2560. "\r\n"
  2561. "\r\n"
  2562. "\0\0\0\0"
  2563. end
  2564.  
  2565. 94    RCDATA
  2566. begin
  2567.     "win32.hlp\0"
  2568.     "#92    LVN_ENDLABELEDIT\0"
  2569.     "LVN_ENDLABELEDIT  AND Parameters\0"
  2570.     "LVN_ENDLABELEDIT\0"
  2571.  
  2572. "WDJ SDK Annotation #92"
  2573. "\r\n"
  2574. "\r\n"
  2575. "If your dialog procedure handles a WM_NOTIFY that requires a "
  2576. "return value (as this one does), note that you MUST both "
  2577. "return a non-zero value (to indicate to the dialog manager "
  2578. "that you wish to specify a return value for the message) AND "
  2579. "store the desired return value for the message in the window "
  2580. "field DWL_MSGRESULT.  The standard Windows header file "
  2581. "windowsx.h provides a macro called SetDlgMsgResult() that "
  2582. "makes this easy: "
  2583. "\r\n"
  2584. "\r\n"
  2585. " #include <windowsx.h>\r\n"
  2586. " //...\r\n"
  2587. " case WM_NOTIFY  :\r\n"
  2588. "     {\r\n"
  2589. "     NMHDR* Head = (NMHDR*)lParam;\r\n"
  2590. "     if(Head->code == LVN_ENDLABELEDIT)\r\n"
  2591. "         // allow user to edit listview labels\r\n"
  2592. "         return SetDlgMsgResult(Dialog, WM_NOTIFY, TRUE);\r\n"
  2593. "     }\r\n"
  2594. "\r\n"
  2595. "\r\n"
  2596. "\0\0\0\0"
  2597. end
  2598.  
  2599. 95    RCDATA
  2600. begin
  2601.     "win32.hlp\0"
  2602.     "#92    LVN_BEGINLABELEDIT\0"
  2603.     "LVN_BEGINLABELEDIT AND Parameters\0"
  2604.     "LVN_BEGINLABELEDIT\0"
  2605.  
  2606. "WDJ SDK Annotation #92"
  2607. "\r\n"
  2608. "\r\n"
  2609. "If your dialog procedure handles a WM_NOTIFY that requires a "
  2610. "return value (as this one does), note that you MUST both "
  2611. "return a non-zero value (to indicate to the dialog manager "
  2612. "that you wish to specify a return value for the message) AND "
  2613. "store the desired return value for the message in the window "
  2614. "field DWL_MSGRESULT.  The standard Windows header file "
  2615. "windowsx.h provides a macro called SetDlgMsgResult() that "
  2616. "makes this easy: "
  2617. "\r\n"
  2618. "\r\n"
  2619. " #include <windowsx.h>\r\n"
  2620. " //...\r\n"
  2621. " case WM_NOTIFY  :\r\n"
  2622. "     {\r\n"
  2623. "     NMHDR* Head = (NMHDR*)lParam;\r\n"
  2624. "     if(Head->code == LVN_BEGINLABELEDIT)\r\n"
  2625. "         // allow user to edit listview labels\r\n"
  2626. "         return SetDlgMsgResult(Dialog, WM_NOTIFY, FALSE);\r\n"
  2627. "     }\r\n"
  2628. "\r\n"
  2629. "\r\n"
  2630. "\0\0\0\0"
  2631. end
  2632.  
  2633. 96    RCDATA
  2634. begin
  2635.     "win31wh.hlp\0"
  2636.     "#93    GetWindowText\0"
  2637.     "GetWindowText \0"
  2638.     "GetWindowText\0"
  2639.  
  2640. "WDJ SDK Annotation #93"
  2641. "\r\n"
  2642. "\r\n"
  2643. "GetWindowText() and GetDlgItemText() will not work when "
  2644. "applied to a standard edit control that belongs to another "
  2645. "application.  The problem is that GetWindowText() and "
  2646. "GetDlgItemText() attempt to optimize by directly examining "
  2647. "the window caption of the target window.  An edit control "
  2648. "stores an empty string in its caption, not the edit control "
  2649. "text, so this fails.  You can avoid this bug by sending a "
  2650. "WM_GETTEXT explicitly: "
  2651. "\r\n"
  2652. "\r\n"
  2653. " HWND OtherEdit;\r\n"
  2654. " char Buffer[256];\r\n"
  2655. " SendMessage(OtherEdit, WM_GETTEXT,\r\n"
  2656. "     sizeof(Buffer), (LPARAM)Buffer);\r\n"
  2657. "\r\n"
  2658. "\r\n"
  2659. "\r\n"
  2660. "\0\0\0\0"
  2661. end
  2662.  
  2663. 97    RCDATA
  2664. begin
  2665.     "win31wh.hlp\0"
  2666.     "#93    GetDlgItemText\0"
  2667.     "GetDlgItemText \0"
  2668.     "GetDlgItemText\0"
  2669.  
  2670. "WDJ SDK Annotation #93"
  2671. "\r\n"
  2672. "\r\n"
  2673. "GetWindowText() and GetDlgItemText() will not work when "
  2674. "applied to a standard edit control that belongs to another "
  2675. "application.  The problem is that GetWindowText() and "
  2676. "GetDlgItemText() attempt to optimize by directly examining "
  2677. "the window caption of the target window.  An edit control "
  2678. "stores an empty string in its caption, not the edit control "
  2679. "text, so this fails.  You can avoid this bug by sending a "
  2680. "WM_GETTEXT explicitly: "
  2681. "\r\n"
  2682. "\r\n"
  2683. " HWND OtherEdit;\r\n"
  2684. " char Buffer[256];\r\n"
  2685. " SendMessage(OtherEdit, WM_GETTEXT,\r\n"
  2686. "     sizeof(Buffer), (LPARAM)Buffer);\r\n"
  2687. "\r\n"
  2688. "\r\n"
  2689. "\0\0\0\0"
  2690. end
  2691.  
  2692. 98    RCDATA
  2693. begin
  2694.     "win32.hlp\0"
  2695.     "#94    LVM_GETCOLUMNWIDTH\0"
  2696.     "LVM_GETCOLUMNWIDTH AND Parameters\0"
  2697.     "LVM_GETCOLUMNWIDTH\0"
  2698.  
  2699. "WDJ SDK Annotation #94"
  2700. "\r\n"
  2701. "\r\n"
  2702. "The documentation claims that this message returns the "
  2703. "column width if successful, \042or zero otherwise\042.  In fact, "
  2704. "if you specify an invalid column number, this function "
  2705. "returns garbage.  Therefore, you cannot use this message to "
  2706. "count the number of columns in a listview control.  The "
  2707. "associated message, LVM_GETCOLUMN, does correctly return "
  2708. "zero when passed an invalid column number, so you can use "
  2709. "LVM_GETCOLUMN to determine the number of columns in a "
  2710. "listview control.  "
  2711. "\r\n"
  2712. "\r\n"
  2713. "\0\0\0\0"
  2714. end
  2715.  
  2716. 99    RCDATA
  2717. begin
  2718.     "win31wh.hlp\0"
  2719.     "#95    SystemParametersInfo (3.1)\0"
  2720.     "SystemParametersInfo \0"
  2721.     "SystemParametersInfo (3.1)\0"
  2722.  
  2723. "WDJ SDK Annotation #95"
  2724. "\r\n"
  2725. "\r\n"
  2726. "The documentation says that the screen saver time out "
  2727. "(SPI_GETSCREENSAVETIMEOUT) is specified in milliseconds.  In "
  2728. "fact, the value returned is in seconds. "
  2729. "\r\n"
  2730. "\r\n"
  2731. "Submitted by: Carlton Guc "
  2732. "\r\n"
  2733. "\r\n"
  2734. "\r\n"
  2735. "\r\n"
  2736. "\0\0\0\0"
  2737. end
  2738.  
  2739. 100    RCDATA
  2740. begin
  2741.     "win32.hlp\0"
  2742.     "#96    LVN_ENDLABELEDIT\0"
  2743.     "LVN_ENDLABELEDIT AND Parameters\0"
  2744.     "LVN_ENDLABELEDIT\0"
  2745.  
  2746. "WDJ SDK Annotation #96"
  2747. "\r\n"
  2748. "\r\n"
  2749. "The documentation claims that there is no return value for "
  2750. "this message.  In fact, you should return FALSE if you want "
  2751. "to reject the user's editing, or TRUE if you want to allow "
  2752. "the changes to the listview item.  If you are handling this "
  2753. "notification inside a dialog procedure, remember that you "
  2754. "must return a non-zero result AND store the message result "
  2755. "(either TRUE or FALSE) in DWL_MSGRESULT, using either "
  2756. "SetWindowLong() or the SetDlgMsgResult() macro (defined in "
  2757. "windowsx.h).  "
  2758. "\r\n"
  2759. "\r\n"
  2760. "Submitted by: Poul A. Costinsky "
  2761. "\r\n"
  2762. "\r\n"
  2763. "\r\n"
  2764. "\0\0\0\0"
  2765. end
  2766.  
  2767. 101    RCDATA
  2768. begin
  2769.     "win32.hlp\0"
  2770.     "#98    RegSetValueEx\0"
  2771.     "RegSetValueEx AND \042See also\042\0"
  2772.     "RegSetValueEx\0"
  2773.  
  2774. "WDJ SDK Annotation #98"
  2775. "\r\n"
  2776. "\r\n"
  2777. "For string-based data types, such as REG_SZ, this function "
  2778. "behaves differently under Win95 and NT.  Under Win95, if you "
  2779. "pass a value of \042abcd\042 and a length of 4, the function will "
  2780. "actually append a null byte, and if you retrieve the value "
  2781. "later, you will find it has a length of 5.  Under NT, this "
  2782. "function stores exactly what you tell it to store.  "
  2783. "\r\n"
  2784. "\r\n"
  2785. "Submitted by Paula Tomlinson. "
  2786. "\r\n"
  2787. "\r\n"
  2788. "\0\0\0\0"
  2789. end
  2790.  
  2791. 102    RCDATA
  2792. begin
  2793.     "win32.hlp\0"
  2794.     "#97    LVN_ITEMCHANGING\0"
  2795.     "LVN_ITEMCHANGING AND Parameters\0"
  2796.     "LVN_ITEMCHANGING\0"
  2797.  
  2798. "WDJ SDK Annotation #97"
  2799. "\r\n"
  2800. "\r\n"
  2801. "The documentation incorrectly claims that you have to return "
  2802. "TRUE to allow the change, or FALSE to prevent it.  In fact, "
  2803. "you have to return FALSE to allow the change or TRUE to "
  2804. "prevent it.  "
  2805. "\r\n"
  2806. "\r\n"
  2807. "Submitted by V. Ramachandran. "
  2808. "\r\n"
  2809. "\r\n"
  2810. "\r\n"
  2811. "\r\n"
  2812. "\0\0\0\0"
  2813. end
  2814.  
  2815. 103    RCDATA
  2816. begin
  2817.     "win32.hlp\0"
  2818.     "#99    LV_DISPINFO\0"
  2819.     "LV_DISPINFO AND Parameters\0"
  2820.     "LV_DISPINFO\0"
  2821.  
  2822. "WDJ SDK Annotation #99"
  2823. "\r\n"
  2824. "\r\n"
  2825. "The documentation says you can set the LVIF_DI_SETITEM flag "
  2826. "in the mask member to have Windows store the string and not "
  2827. "ask for it again.  It fails to point out that this only "
  2828. "works for subitem 0 (the first column), so you would still "
  2829. "have to handle requests for the text of the other columns.  "
  2830. "\r\n"
  2831. "\r\n"
  2832. "Submitted by V. Ramachandran. "
  2833. "\r\n"
  2834. "\r\n"
  2835. "\r\n"
  2836. "\0\0\0\0"
  2837. end
  2838.  
  2839. 104    RCDATA
  2840. begin
  2841.     "win32.hlp\0"
  2842.     "#100    LVM_EDITLABEL\0"
  2843.     "LVM_EDITLABEL AND Parameters\0"
  2844.     "LVM_EDITLABEL\0"
  2845.  
  2846. "WDJ SDK Annotation #100"
  2847. "\r\n"
  2848. "\r\n"
  2849. "Note that the listview control implements in-place editing "
  2850. "by creating an edit control on the fly.  Unfortunately, it "
  2851. "assigns that edit control a child ID of IDOK, which means "
  2852. "that the parent of the listview control will receive edit "
  2853. "control notifications that it might not expect.  For "
  2854. "example, if your listview control is in a dialog box, and "
  2855. "your dialog procedure contains code like this: "
  2856. "\r\n"
  2857. "\r\n"
  2858. " // inside WM_COMMAND handler...\r\n"
  2859. " if(ControlId == IDOK)\r\n"
  2860. "     EndDialog(Dialog, TRUE);\r\n"
  2861. "\r\n"
  2862. "Then it may terminate the dialog when the user starts "
  2863. "editing a listview item (since the transient edit control "
  2864. "will send notifications like EN_CHANGE, with a control ID of "
  2865. "IDOK). The above code should read: "
  2866. "\r\n"
  2867. "\r\n"
  2868. " // inside WM_COMMAND handler...\r\n"
  2869. " if(ControlId == IDOK && NotifyCode == BN_CLICKED)\r\n"
  2870. "     EndDialog(Dialog, TRUE);\r\n"
  2871. "\r\n"
  2872. "to be safe. "
  2873. "\r\n"
  2874. "\r\n"
  2875. "\r\n"
  2876. "\r\n"
  2877. "\r\n"
  2878. "\r\n"
  2879. "\r\n"
  2880. "\0\0\0\0"
  2881. end
  2882.  
  2883. 105    RCDATA
  2884. begin
  2885.     "win31wh.hlp\0"
  2886.     "#101    GetWindowTextLength (2.x)\0"
  2887.     "GetWindowTextLength\0"
  2888.     "GetWindowTextLength (2.x)\0"
  2889.  
  2890. "WDJ SDK Annotation #101"
  2891. "\r\n"
  2892. "\r\n"
  2893. "Due to a bug in Windows 3.1, both GetWindowTextLength() and "
  2894. "WM_GETTEXTLENGTH return -1 if you use it on a combobox of "
  2895. "style CBS_DROPDOWNLIST.  "
  2896. "\r\n"
  2897. "\r\n"
  2898. "Submitted by Mircea Neacsu "
  2899. "\r\n"
  2900. "\r\n"
  2901. "\r\n"
  2902. "\r\n"
  2903. "\0\0\0\0"
  2904. end
  2905.  
  2906. 106    RCDATA
  2907. begin
  2908.     "win32.hlp\0"
  2909.     "#102    LB_ADDSTRING\0"
  2910.     "LB_ADDSTRING AND Parameters\0"
  2911.     "LB_ADDSTRING\0"
  2912.  
  2913. "WDJ SDK Annotation #102"
  2914. "\r\n"
  2915. "\r\n"
  2916. "If you are planning to add a large number (more than 100) of "
  2917. "strings by calling LB_ADDSTRING, LB_INSERTSTRING, LB_DIR, or "
  2918. "LB_ADDFILE, consider first sending the new Win32 message "
  2919. "LB_INITSTORAGE to give the listbox a chance to preallocate "
  2920. "memory, thus speeding up the process.  "
  2921. "\r\n"
  2922. "\r\n"
  2923. "Submitted by V. Ramachandran. "
  2924. "\r\n"
  2925. "\r\n"
  2926. "\r\n"
  2927. "\0\0\0\0"
  2928. end
  2929.  
  2930. 107    RCDATA
  2931. begin
  2932.     "win32.hlp\0"
  2933.     "#102    LB_ADDSTRING\0"
  2934.     "LB_ADDSTRING AND Parameters\0"
  2935.     "LB_ADDSTRING\0"
  2936.  
  2937. "WDJ SDK Annotation #102"
  2938. "\r\n"
  2939. "\r\n"
  2940. "If you are planning to add a large number (more than 100) of "
  2941. "strings by calling LB_ADDSTRING, LB_INSERTSTRING, LB_DIR, or "
  2942. "LB_ADDFILE, consider first sending the new Win32 message "
  2943. "LB_INITSTORAGE to give the listbox a chance to preallocate "
  2944. "memory, thus speeding up the process.  "
  2945. "\r\n"
  2946. "\r\n"
  2947. "Submitted by V. Ramachandran. "
  2948. "\r\n"
  2949. "\r\n"
  2950. "\r\n"
  2951. "\0\0\0\0"
  2952. end
  2953.  
  2954. 108    RCDATA
  2955. begin
  2956.     "win32.hlp\0"
  2957.     "#103    LoadString\0"
  2958.     "LoadString AND \042See also\042\0"
  2959.     "LoadString\0"
  2960.  
  2961. "WDJ SDK Annotation #103"
  2962. "\r\n"
  2963. "\r\n"
  2964. "Even though resource strings are stored as Unicode for both "
  2965. "Win95 and NT programs, Win95 does not provide an "
  2966. "implementation of the Unicode version of LoadString() "
  2967. "(LoadStringW()).  This usually trips up NT programmers who "
  2968. "want to create a single .exe for both operating systems and "
  2969. "yet still use Unicode under NT.  In that case, you must at "
  2970. "runtime detect that you are running under Win95 and, in that "
  2971. "case, explicitly call LoadStringA().  Otherwise, if you have "
  2972. "compiled with _UNICODE defined, LoadString() will expand "
  2973. "into LoadStringW(), which is just a stub that fails under "
  2974. "Win95.  "
  2975. "\r\n"
  2976. "\r\n"
  2977. "Submitted by Paula Tomlinson. "
  2978. "\r\n"
  2979. "\r\n"
  2980. "\r\n"
  2981. "\r\n"
  2982. "\0\0\0\0"
  2983. end
  2984.  
  2985. 109    RCDATA
  2986. begin
  2987.     "win32.hlp\0"
  2988.     "#104    LVN_DELETEITEM\0"
  2989.     "LVN_DELETEITEM AND Parameters\0"
  2990.     "LVN_DELETEITEM\0"
  2991.  
  2992. "WDJ SDK Annotation #104"
  2993. "\r\n"
  2994. "\r\n"
  2995. "The documentation implies that this notification "
  2996. "arrives after the item is deleted. In fact, it "
  2997. "arrives before the item is deleted from the listview "
  2998. "control. "
  2999. "\r\n"
  3000. "\r\n"
  3001. "Submitted by V. Ramachandran. "
  3002. "\r\n"
  3003. "\r\n"
  3004. "\r\n"
  3005. "\0\0\0\0"
  3006. end
  3007.  
  3008. 110    RCDATA
  3009. begin
  3010.     "win32.hlp\0"
  3011.     "#105    IsWindow\0"
  3012.     "IsWindow AND Parameters\0"
  3013.     "IsWindow\0"
  3014.  
  3015. "WDJ SDK Annotation #105"
  3016. "\r\n"
  3017. "\r\n"
  3018. "The documentation claims this function returns TRUE if the "
  3019. "given handle is a valid window handle.  That was true under "
  3020. "Windows 3.x and is true under Windows NT, but Windows 95 "
  3021. "returns a large non-zero value that is not equal to 1 (nor "
  3022. "is it equal to the window handle). In an un-indexed help "
  3023. "topic in the initial Win95 SDK, Microsoft reveals that "
  3024. "Win95 functions with BOOL return types are only guaranteed "
  3025. "to return non-zero when the documentation claims they "
  3026. "return TRUE. Windows NT appears to behave as documented. "
  3027. "\r\n"
  3028. "\r\n"
  3029. "Submitted by: David Lowndes "
  3030. "\r\n"
  3031. "\r\n"
  3032. "\r\n"
  3033. "\0\0\0\0"
  3034. end
  3035.  
  3036. 111    RCDATA
  3037. begin
  3038.     "win32.hlp\0"
  3039.     "#105    GetClientRect\0"
  3040.     "GetClientRect AND \042See also\042\0"
  3041.     "GetClientRect\0"
  3042.  
  3043. "WDJ SDK Annotation #105"
  3044. "\r\n"
  3045. "\r\n"
  3046. "The documentation claims this function returns TRUE if the "
  3047. "given handle is a valid window handle.  That was true under "
  3048. "Windows 3.x and is true under Windows NT, but Windows 95 "
  3049. "returns a large non-zero value that is not equal to 1 (nor "
  3050. "is it equal to the window handle). In an un-indexed help "
  3051. "topic in the initial Win95 SDK, Microsoft reveals that "
  3052. "Win95 functions with BOOL return types are only guaranteed "
  3053. "to return non-zero when the documentation claims they "
  3054. "return TRUE. Windows NT appears to behave as documented. "
  3055. "\r\n"
  3056. "\r\n"
  3057. "Submitted by: Ron Scott "
  3058. "\r\n"
  3059. "\r\n"
  3060. "\r\n"
  3061. "\0\0\0\0"
  3062. end
  3063.  
  3064. 112    RCDATA
  3065. begin
  3066.     "win32.hlp\0"
  3067.     "#106    WM_GETDLGCODE\0"
  3068.     "WM_GETDLGCODE AND Parameters\0"
  3069.     "WM_GETDLGCODE\0"
  3070.  
  3071. "WDJ SDK Annotation #106"
  3072. "\r\n"
  3073. "\r\n"
  3074. "The documentation WM_GETDLGCODE states that this message has "
  3075. "no parameters. But the truth is that if the user presses a "
  3076. "key, lParam will contain a pointer to a MSG structure "
  3077. "containing information about the event that made Windows send "
  3078. "the WM_GETDLGCODE message.  This is indirectly documented in "
  3079. "windowsx.h, where the HANDLE_WM_GETDLGCODE() macro passes "
  3080. "two arguments to the handler: the window handle and (MSG "
  3081. "FAR*)(lParam).  "
  3082. "\r\n"
  3083. "\r\n"
  3084. "Submitted by: Patrick Tennberg "
  3085. "Reference: Microsoft Knowledge Base article Q83302 "
  3086. "\r\n"
  3087. "\r\n"
  3088. "\r\n"
  3089. "\r\n"
  3090. "\0\0\0\0"
  3091. end
  3092.  
  3093. 113    RCDATA
  3094. begin
  3095.     "win32.hlp\0"
  3096.     "#107    DBT_DEVICEQUERYREMOVE\0"
  3097.     "DBT_DEVICEQUERYREMOVE AND Parameters\0"
  3098.     "DBT_DEVICEQUERYREMOVE\0"
  3099.  
  3100. "WDJ SDK Annotation #107"
  3101. "\r\n"
  3102. "\r\n"
  3103. "The documentation incorrectly says that you should return "
  3104. "FALSE if you want to veto the device removal.  In fact, you "
  3105. "have to return BROADCAST_QUERY_DENY; returning FALSE will "
  3106. "allow the device removal to proceed.  "
  3107. "\r\n"
  3108. "\r\n"
  3109. "Submitted by Paula Tomlinson. "
  3110. "\r\n"
  3111. "\r\n"
  3112. "\r\n"
  3113. "\0\0\0\0"
  3114. end
  3115.  
  3116. 114    RCDATA
  3117. begin
  3118.     "win31wh.hlp\0"
  3119.     "#108    LZOpenFile\0"
  3120.     "LZOpenFile \0"
  3121.     "LZOpenFile\0"
  3122.  
  3123. "WDJ SDK Annotation #108"
  3124. "\r\n"
  3125. "\r\n"
  3126. "\r\n"
  3127. "However, if lpszFile contains only a filename and extension "
  3128. "(i.e.  no path is specified), then LZOpenFile() use the same "
  3129. "searching logic as OpenFile().  If no file with the matching "
  3130. "name (and extension) is found, then it searches for the "
  3131. "compressed filename.  The compressed file has a _ as the "
  3132. "last character (e.g., the compressed version of \042readme.txt\042 "
  3133. "is \042readme.tx_\042).  Therefore if you use LZOpenFile() to open "
  3134. "a file called \042readme.txt\042, it searches as follows: "
  3135. "\r\n"
  3136. "\r\n"
  3137. " 1) it looks for \042readme.txt\042 using the same search\r\n"
  3138. "    algorithm as OpenFile().\r\n"
  3139. " 2) if the file was not found, it uses the same\r\n"
  3140. "    algorithm to search for \042readme.tx_\042.\r\n"
  3141. "\r\n"
  3142. "That means LZOpenFile() might open a \042readme.tx_\042 file from "
  3143. "a directory other than the one you expected.  Even if you "
  3144. "specify the complete filename (such as "
  3145. "\042c:\\demo\\readme.txt\042), LZOpenFile() first searches for the "
  3146. "specified file, and if the specified filename is not found, "
  3147. "it searches for the compressed file in the same directory "
  3148. "(\042c:\\demo\\readme.tx_\042).  "
  3149. "\r\n"
  3150. "\r\n"
  3151. "Submitted by V. Ramachandran. "
  3152. "\r\n"
  3153. "\r\n"
  3154. "\r\n"
  3155. "\0\0\0\0"
  3156. end
  3157.  
  3158. 115    RCDATA
  3159. begin
  3160.     "win32.hlp\0"
  3161.     "#109    SetCapture\0"
  3162.     "SetCapture AND Parameters\0"
  3163.     "SetCapture\0"
  3164.  
  3165. "WDJ SDK Annotation #109"
  3166. "\r\n"
  3167. "\r\n"
  3168. "This help topic does not document the fact that when the "
  3169. "mouse is captured, menu hotkeys (for example, Alt+F for "
  3170. "accessing the File menu) and other keyboard accelerators do "
  3171. "not work (ex: Alt+F4).  This is because DefWindowProc() "
  3172. "handles the WM_SYSCHAR and WM_SYSCOMMAND messages "
  3173. "differently if the mouse has been captured (by any window).  "
  3174. "\r\n"
  3175. "\r\n"
  3176. "DefWindowProc() processes the WM_SYSCHAR message to check if "
  3177. "the pressed key is a menu hotkey (Alt+F for example).  If it "
  3178. "is, then it causes the menu to drop down.  However, if the "
  3179. "mouse is captured, it does not do the above action.  "
  3180. "Whenever DefWindowProc() sees a WM_SYSCOMMAND and finds that "
  3181. "the mouse is captured, then it does nothing.  "
  3182. "\r\n"
  3183. "\r\n"
  3184. "Submitted by V. Ramachandran. "
  3185. "\r\n"
  3186. "\r\n"
  3187. "\r\n"
  3188. "\r\n"
  3189. "\0\0\0\0"
  3190. end
  3191.  
  3192. 116    RCDATA
  3193. begin
  3194.     "win32.hlp\0"
  3195.     "#110    RegCreateKey\0"
  3196.     "RegCreateKey AND \042See also\042\0"
  3197.     "RegCreateKey\0"
  3198.  
  3199. "WDJ SDK Annotation #110"
  3200. "\r\n"
  3201. "\r\n"
  3202. "The documentation for RegCreateKey(), RegCreateKeyEx(), "
  3203. "RegOpenKey(), and RegOpenKeyEx() all list several predefined "
  3204. "handles you can use, such as HKEY_CURRENT_USER.  However, "
  3205. "they fail to document the predefined key "
  3206. "HKEY_CURRENT_CONFIG, which has a structure similar to the "
  3207. "registry tree under HKEY_LOCAL_MACHINE, but is for storing "
  3208. "information specific to the current hardware profile.  "
  3209. "\r\n"
  3210. "\r\n"
  3211. "Submitted by Paula Tomlinson. "
  3212. "\r\n"
  3213. "\r\n"
  3214. "\r\n"
  3215. "\r\n"
  3216. "\r\n"
  3217. "\r\n"
  3218. "\0\0\0\0"
  3219. end
  3220.  
  3221. 117    RCDATA
  3222. begin
  3223.     "win32.hlp\0"
  3224.     "#111    CreateFile\0"
  3225.     "CreateFile AND \042See also\042\0"
  3226.     "CreateFile\0"
  3227.  
  3228. "WDJ SDK Annotation #111"
  3229. "\r\n"
  3230. "\r\n"
  3231. "The documentation claims CreateFile() returns a handle that "
  3232. "can be used to access the object.  However, under both NT "
  3233. "and Win95, CreateFile() will appear to succeed and return a "
  3234. "valid handle if you attempt to open a file with "
  3235. "GENERIC_WRITE permissions on a read-only medium (e.g., "
  3236. "protected floppy or CD-ROM).  If you then try to perform a "
  3237. "write with the returned handle, that will fail.  "
  3238. "\r\n"
  3239. "\r\n"
  3240. "\r\n"
  3241. "Submitted by: David Lowndes "
  3242. "\r\n"
  3243. "\r\n"
  3244. "\r\n"
  3245. "\r\n"
  3246. "\r\n"
  3247. "\0\0\0\0"
  3248. end
  3249.  
  3250. 118    RCDATA
  3251. begin
  3252.     "win32.hlp\0"
  3253.     "#112    GetWindowText\0"
  3254.     "GetWindowText AND \042See Also\042\0"
  3255.     "GetWindowText\0"
  3256.  
  3257. "WDJ SDK Annotation #112"
  3258. "\r\n"
  3259. "\r\n"
  3260. "The third argument is the \042maximum numbers of characters to "
  3261. "copy\042.  It may not be clear that this number must include "
  3262. "the NULL byte so, for example, it never makes sense to set "
  3263. "this argument to 1 since all you could get back is a NULL "
  3264. "byte.  If you want to use GetWindowText() to retrieve a "
  3265. "single character (e.g., from an edit control), you would "
  3266. "have to specify a length of 2 -- one for the character and "
  3267. "one for the terminating NULL byte.  "
  3268. "\r\n"
  3269. "\r\n"
  3270. "Submitted by: Tony Yuricich "
  3271. "\r\n"
  3272. "\r\n"
  3273. "\r\n"
  3274. "\r\n"
  3275. "\r\n"
  3276. "\0\0\0\0"
  3277. end
  3278.  
  3279. 119    RCDATA
  3280. begin
  3281.     "win32.hlp\0"
  3282.     "#113    keybd_event\0"
  3283.     "keybd_event AND \042See also\042\0"
  3284.     "keybd_event\0"
  3285.  
  3286. "WDJ SDK Annotation #113"
  3287. "\r\n"
  3288. "\r\n"
  3289. "You can use this function to toggle keys such as the Caps "
  3290. "Lock, Scroll Lock, and Num Lock.  Unfortunately, though "
  3291. "toggling these three keys works correctly under NT, you "
  3292. "cannot use this function to toggle the Num Lock key under "
  3293. "Win95.  "
  3294. "\r\n"
  3295. "\r\n"
  3296. "\r\n"
  3297. "\r\n"
  3298. "\0\0\0\0"
  3299. end
  3300.  
  3301. 120    RCDATA
  3302. begin
  3303.     "win31wh.hlp\0"
  3304.     "#114    WM_CTLCOLOR (2.x)\0"
  3305.     "WM_CTLCOLOR \0"
  3306.     "WM_CTLCOLOR (2.x)\0"
  3307.  
  3308. "WDJ SDK Annotation #114"
  3309. "\r\n"
  3310. "\r\n"
  3311. "\r\n"
  3312. "\r\n"
  3313. "The documentation incorrectly states that \042the return value "
  3314. "from this message has no effect on a button with the "
  3315. "BS_PUSHBUTTON or BS_DEFPUSHBUTTON style.\042 In fact, returning "
  3316. "a brush handle in response to this message appears to "
  3317. "determine the color of the pushbutton window background, "
  3318. "which is visible as the tiny areas in the corners of the "
  3319. "pushbutton window.  Note that under Windows 95, pushbuttons "
  3320. "fill the entire client area of their windows, thus hiding "
  3321. "the window background from view.  "
  3322. "\r\n"
  3323. "\r\n"
  3324. "Submitted by: Forest Wilkinson "
  3325. "\r\n"
  3326. "\r\n"
  3327. "\r\n"
  3328. "\r\n"
  3329. "\r\n"
  3330. "\0\0\0\0"
  3331. end
  3332.  
  3333. 121    RCDATA
  3334. begin
  3335.     "win32.hlp\0"
  3336.     "#115    GlobalDeleteAtom\0"
  3337.     "GlobalDeleteAtom AND \042See also\042\0"
  3338.     "GlobalDeleteAtom\0"
  3339.  
  3340. "WDJ SDK Annotation #115"
  3341. "\r\n"
  3342. "\r\n"
  3343. "The documentation for GlobalDeleteAtom states: "
  3344. "\r\n"
  3345. "\r\n"
  3346. "  \042The only way to ensure that an atom has been deleted from the \r\n"
  3347. "atom table is to call this function repeatedly until it fails.\042 "
  3348. "\r\n"
  3349. "\r\n"
  3350. "Unfortunately, a 32-bit program running under Win NT 3.51 never fails, "
  3351. "making for an infinite loop (Windows 95 functions as documented). "
  3352. "Microsoft says this may be fixed in the next release (NT 4.0). "
  3353. "\r\n"
  3354. "\r\n"
  3355. "Submitted by Ken Brown "
  3356. "\r\n"
  3357. "\r\n"
  3358. "\r\n"
  3359. "\0\0\0\0"
  3360. end
  3361.  
  3362. 122    RCDATA
  3363. begin
  3364.     "win32.hlp\0"
  3365.     "#116    LB_ADDSTRING\0"
  3366.     "LB_ADDSTRING AND \042See also\042\0"
  3367.     "LB_ADDSTRING\0"
  3368.  
  3369. "WDJ SDK Annotation #116"
  3370. "\r\n"
  3371. "\r\n"
  3372. "If your listbox has the WS_HSCROLL style, and if you are "
  3373. "adding a string wider than the listbox, you may have to send "
  3374. "a LB_SETHORIZONTALEXTENT message to make the horizontal "
  3375. "scrollbar appear.  The listbox does not automatically check "
  3376. "each newly added string and add the horizontal scrollbar "
  3377. "when a too-wide string is added or inserted.  "
  3378. "\r\n"
  3379. "\r\n"
  3380. "\r\n"
  3381. "\r\n"
  3382. "\r\n"
  3383. "\0\0\0\0"
  3384. end
  3385.  
  3386. 123    RCDATA
  3387. begin
  3388.     "win32.hlp\0"
  3389.     "#117    LB_DIR\0"
  3390.     "LB_DIR AND \042See also\042\0"
  3391.     "LB_DIR\0"
  3392.  
  3393. "WDJ SDK Annotation #117"
  3394. "\r\n"
  3395. "\r\n"
  3396. "If you pass a long filename to LB_DIR, it works "
  3397. "under NT 3.51, but fails under Win95 because it "
  3398. "relies on the 16-bit listbox which was not changed "
  3399. "to handle long filenames. You can avoid the error "
  3400. "by first translating the filename to a short filename "
  3401. "by calling GetShortPathName(). The LB_DIR will not "
  3402. "fail, but it will still display only the short versions "
  3403. "of any long filenames in the subdirectory. "
  3404. "\r\n"
  3405. "\r\n"
  3406. "Reference: Microsoft Knowledge Base article Q131286 "
  3407. "\r\n"
  3408. "\r\n"
  3409. "\r\n"
  3410. "\r\n"
  3411. "\r\n"
  3412. "\0\0\0\0"
  3413. end
  3414.  
  3415. 124    RCDATA
  3416. begin
  3417.     "win32.hlp\0"
  3418.     "#118    ReadFile\0"
  3419.     "ReadFile AND \042See also\042\0"
  3420.     "ReadFile\0"
  3421.  
  3422. "WDJ SDK Annotation #118"
  3423. "\r\n"
  3424. "\r\n"
  3425. "The documentation correctly points out that Win95 "
  3426. "does not support OVERLAPPED I/O. However, it incorrectly "
  3427. "states that you must pass a pointer to a structure of "
  3428. "type OVERLAPPED if the file was created (or opened) "
  3429. "with the flag FILE_FLAG_OVERLAPPED. In fact, if you "
  3430. "pass a pointer (rather than NULL) under Windows 95, "
  3431. "ReadFile() returns FALSE, and GetLastError() returns "
  3432. "ERROR_INVALID_PARAMETER, whether or not the file "
  3433. "was created/opened with the FILE_FLAG_OVERLAPPED "
  3434. "flag. That means that if you want to code a call "
  3435. "to ReadFile() that works correctly for both "
  3436. "synchronous and asynchronous I/O, you must detect "
  3437. "at runtime that you're running under Win95 and "
  3438. "treat that case differently. "
  3439. "\r\n"
  3440. "\r\n"
  3441. "\r\n"
  3442. "\r\n"
  3443. "\0\0\0\0"
  3444. end
  3445.  
  3446. 125    RCDATA
  3447. begin
  3448.     "win32.hlp\0"
  3449.     "#119    WinMain\0"
  3450.     "WinMain AND \042See also\042\0"
  3451.     "WinMain\0"
  3452.  
  3453. "WDJ SDK Annotation #119"
  3454. "\r\n"
  3455. "\r\n"
  3456. "Note that the string passed in lpCmdLine is not the same as "
  3457. "the string returned by GetCommandLine().  The string in "
  3458. "lpCmdLine contains the command line arguments only, but "
  3459. "GetCommandLine() returns the program name followed by the "
  3460. "arguments.  "
  3461. "\r\n"
  3462. "\r\n"
  3463. "If you specify the following command: 'winword abc.doc', and "
  3464. "winword exists in d:\\msoffice\\winword.exe, lpCmdLine will "
  3465. "contain 'abc.doc', while GetCommandLine will return "
  3466. "'\042d:\\msoffice\\winword.exe\042 abc.doc' Note the double quotes "
  3467. "around the exe name.  "
  3468. "\r\n"
  3469. "\r\n"
  3470. "Submitted by Phil Rodgers. "
  3471. "\r\n"
  3472. "\r\n"
  3473. "\0\0\0\0"
  3474. end
  3475.  
  3476. 126    RCDATA
  3477. begin
  3478.     "win32.hlp\0"
  3479.     "#119    GetCommandLine\0"
  3480.     "GetCommandLine AND \042See also\042\0"
  3481.     "GetCommandLine\0"
  3482.  
  3483. "WDJ SDK Annotation #119"
  3484. "\r\n"
  3485. "\r\n"
  3486. "Note that the string passed in the lpCmdLine parameter to "
  3487. "WinMain is not the same as the string returned by "
  3488. "GetCommandLine().  GetCommandLine() returns the complete "
  3489. "program name enclosed in double quotes, followed by the "
  3490. "arguments; whereas the lpCmdLine parameter of WinMain "
  3491. "contains the command line arguments only.  "
  3492. "\r\n"
  3493. "\r\n"
  3494. "If you specify the following command: 'winword abc.doc', and "
  3495. "winword exists in d:\\msoffice\\winword.exe, lpCmdLine will "
  3496. "contain 'abc.doc', while GetCommandLine will return "
  3497. "'\042d:\\msoffice\\winword.exe\042 abc.doc' Note the double quotes "
  3498. "around the exe name.  "
  3499. "\r\n"
  3500. "\r\n"
  3501. "Submitted by Phil Rodgers. "
  3502. "\r\n"
  3503. "\r\n"
  3504. "\0\0\0\0"
  3505. end
  3506.  
  3507. 127    RCDATA
  3508. begin
  3509.     "win32.hlp\0"
  3510.     "#120    ShellAbout\0"
  3511.     "ShellAbout AND \042See also\042\0"
  3512.     "ShellAbout\0"
  3513.  
  3514. "WDJ SDK Annotation #120"
  3515. "\r\n"
  3516. "\r\n"
  3517. "The documentation says that in Windows 95 ShellAbout will "
  3518. "prepend \042Microsoft Windows\042 to the title of the application.  "
  3519. "This is not true.  Actually, this function prepends only "
  3520. "\042Microsoft\042, so if your app is called \042MyApp\042, the title "
  3521. "will read \042Microsoft MyApp\042.  "
  3522. "\r\n"
  3523. "\r\n"
  3524. "Submitted by Luis A. Ramos. "
  3525. "\r\n"
  3526. "\r\n"
  3527. "\0\0\0\0"
  3528. end
  3529.  
  3530. 128    RCDATA
  3531. begin
  3532.     "mfc30.hlp\0"
  3533.     "#121    CPropertySheet::SetTitle\0"
  3534.     "SetTitle AND CPropertySheet\0"
  3535.     "CPropertySheet::SetTitle\0"
  3536.  
  3537. "WDJ MFC Annotation #121"
  3538. "\r\n"
  3539. "\r\n"
  3540. "The parameters to this function are interchanged: it should "
  3541. "actually read: "
  3542. "\r\n"
  3543. "\r\n"
  3544. "void SetTitle (LPCTSTR lpszText, UINT nStyle); "
  3545. "\r\n"
  3546. "\r\n"
  3547. "Submitted by Margaret M. O'Connell. "
  3548. "\r\n"
  3549. "\r\n"
  3550. "\0\0\0\0"
  3551. end
  3552.  
  3553. 129    RCDATA
  3554. begin
  3555.     "mfc30.hlp\0"
  3556.     "#122    CCmdTarget::GetIDispatch\0"
  3557.     "GetIDispatch AND CCmdTarget\0"
  3558.     "CCmdTarget::GetIDispatch\0"
  3559.  
  3560. "WDJ MFC Annotation #122"
  3561. "\r\n"
  3562. "\r\n"
  3563. "The MFC 1.5x documentation incorrectly states that this "
  3564. "function takes no parameters. It should read: "
  3565. "\r\n"
  3566. "\r\n"
  3567. " LPDISPATCH GetIDispatch (BOOL bAddRef)\r\n"
  3568. " bAddRef - specifies whether to increment\r\n"
  3569. "           the reference count for the object.\r\n"
  3570. "\r\n"
  3571. "This has been corrected in the MFC 4.0 documentation. "
  3572. "\r\n"
  3573. "\r\n"
  3574. "Submitted by V.Ramachandran. "
  3575. "\r\n"
  3576. "\r\n"
  3577. "\0\0\0\0"
  3578. end
  3579.  
  3580. 130    RCDATA
  3581. begin
  3582.     "win31wh.hlp\0"
  3583.     "#123    LB_SELECTSTRING\0"
  3584.     "LB_SELECTSTRING\0"
  3585.     "LB_SELECTSTRING\0"
  3586.  
  3587. "WDJ SDK Annotation #123"
  3588. "\r\n"
  3589. "\r\n"
  3590. "win31wh.hlp fails to mention that this message works only "
  3591. "with single select listboxes.  For multi-select listboxes it "
  3592. "returns LB_ERR.  "
  3593. "\r\n"
  3594. "\r\n"
  3595. "Submitted by Dino Esposito. "
  3596. "\r\n"
  3597. "\r\n"
  3598. "\0\0\0\0"
  3599. end
  3600.  
  3601. 131    RCDATA
  3602. begin
  3603.     "win32.hlp\0"
  3604.     "#124    AdjustWindowRect\0"
  3605.     "AdjustWindowRect AND \042See also\042\0"
  3606.     "AdjustWindowRect\0"
  3607.  
  3608. "WDJ SDK Annotation #124"
  3609. "\r\n"
  3610. "\r\n"
  3611. "The documentation for AdjustWindowRect() and "
  3612. "AdjustWindowRectEx() has a number of problems.  "
  3613. "\r\n"
  3614. "\r\n"
  3615. "1.  Though the documentation says that window titles and "
  3616. "borders are not taken into account, the function does "
  3617. "account for these styles.  "
  3618. "\r\n"
  3619. "\r\n"
  3620. "2.  Add 1 to the rect.bottom returned by this function.  "
  3621. "There is a one-off error in the y direction.  "
  3622. "\r\n"
  3623. "\r\n"
  3624. "3.  The meaning of the rect parameter is not well explained.  "
  3625. "The input to AdjustWindowRectEx is the window coordinates of "
  3626. "the top-left and bottom-right corners of the desired client "
  3627. "area.  AdjustWindowRectEx inflates the specified rectangle "
  3628. "to include the caption, border and other non-client objects "
  3629. "specified by the style parameter.  "
  3630. "\r\n"
  3631. "\r\n"
  3632. "\r\n"
  3633. "Reference: MSDN Dr.GUI #10 - Calculated Client Window Size. "
  3634. "\r\n"
  3635. "\r\n"
  3636. "Submitted by Etay Szekely. "
  3637. "\r\n"
  3638. "\r\n"
  3639. "\0\0\0\0"
  3640. end
  3641.  
  3642. 132    RCDATA
  3643. begin
  3644.     "win32.hlp\0"
  3645.     "#124    AdjustWindowRectEx\0"
  3646.     "AdjustWindowRectEx AND \042See also\042\0"
  3647.     "AdjustWindowRectEx\0"
  3648.  
  3649. "WDJ SDK Annotation #124"
  3650. "\r\n"
  3651. "\r\n"
  3652. "The documentation for AdjustWindowRect() and "
  3653. "AdjustWindowRectEx() has a number of problems.  "
  3654. "\r\n"
  3655. "\r\n"
  3656. "1.  Though the documentation says that window titles and "
  3657. "borders are not taken into account, they function does "
  3658. "account for these styles.  "
  3659. "\r\n"
  3660. "\r\n"
  3661. "2.  Add 1 to the rect.bottom returned by this function.  "
  3662. "There is a one-off error in the y direction.  "
  3663. "\r\n"
  3664. "\r\n"
  3665. "3.  The meaning of the rect parameter is not well explained.  "
  3666. "The input to AdjustWindowRectEx is the window coordinates of "
  3667. "the top-left and bottom-right corners of the desired client "
  3668. "area.  AdjustWindowRectEx inflates the specified rectangle "
  3669. "to include the caption, border and other non-client objects "
  3670. "specified by the style parameter.  "
  3671. "\r\n"
  3672. "\r\n"
  3673. "\r\n"
  3674. "Reference: MSDN Dr.GUI #10 - Calculated Client Window Size. "
  3675. "\r\n"
  3676. "\r\n"
  3677. "Submitted by Etay Szekely. "
  3678. "\r\n"
  3679. "\r\n"
  3680. "\r\n"
  3681. "\0\0\0\0"
  3682. end
  3683.  
  3684. 133    RCDATA
  3685. begin
  3686.     "mfc30.hlp\0"
  3687.     "#125    CImageList::DeleteObject\0"
  3688.     "DeleteObject AND \042See also\042 NOT HRESULT\0"
  3689.     "CImageList::DeleteObject\0"
  3690.  
  3691. "WDJ MFC Annotation #125"
  3692. "\r\n"
  3693. "\r\n"
  3694. "VC++ 2.1 and 2.2 help files incorrectly documented this "
  3695. "function to delete image lists, while it actually never "
  3696. "existed.  The correct function to delete an image list is "
  3697. "CImageList::DeleteImageList(); it returns non-zero if "
  3698. "successful and zero if it fails. "
  3699. "\r\n"
  3700. "\r\n"
  3701. "This error is corrected in the VC++ 4.0 documentation. "
  3702. "\r\n"
  3703. "\r\n"
  3704. "Submitted by Barry Tannenbaum. "
  3705. "\r\n"
  3706. "\r\n"
  3707. "\0\0\0\0"
  3708. end
  3709.  
  3710. 134    RCDATA
  3711. begin
  3712.     "win32.hlp\0"
  3713.     "#126    AVIFileOpen\0"
  3714.     "AVIFileOpen AND \042See also\042\0"
  3715.     "AVIFileOpen\0"
  3716.  
  3717. "WDJ SDK Annotation #126"
  3718. "\r\n"
  3719. "\r\n"
  3720. "The documentation specifies that using the OF_CREATE flag "
  3721. "will cause an existing file to be truncated to zero length.  "
  3722. "In reality, it has no effect: the file length remains the "
  3723. "same, and the old data is intact once the file is closed.  "
  3724. "\r\n"
  3725. "\r\n"
  3726. "Submitted by Tim Lesher. "
  3727. "\r\n"
  3728. "\r\n"
  3729. "\0\0\0\0"
  3730. end
  3731.  
  3732. 135    RCDATA
  3733. begin
  3734.     "win31wh.hlp\0"
  3735.     "#127    CBTProc\0"
  3736.     "CBTProc\0"
  3737.     "CBTProc\0"
  3738.  
  3739. "WDJ SDK Annotation #127"
  3740. "\r\n"
  3741. "\r\n"
  3742. "The CBTProc documentation fails to mention that you can "
  3743. "return 0 to allow the operation and 1 to prevent it for "
  3744. "HCBT_SETFOCUS notification also.  The documentation has been "
  3745. "corrected in the Win32 help file.  "
  3746. "\r\n"
  3747. "\r\n"
  3748. "Submitted by V.Ramachandran. "
  3749. "\r\n"
  3750. "\r\n"
  3751. "\r\n"
  3752. "\0\0\0\0"
  3753. end
  3754.  
  3755. 136    RCDATA
  3756. begin
  3757.     "win32.hlp\0"
  3758.     "#128    GetDialogBaseUnits\0"
  3759.     "GetDialogBaseUnits AND \042See also\042\0"
  3760.     "GetDialogBaseUnits\0"
  3761.  
  3762. "WDJ SDK Annotation #128"
  3763. "\r\n"
  3764. "\r\n"
  3765. "GetDialogBaseUnits() does not return correct dialog base "
  3766. "units if the dialog is not using the system font.  Use the "
  3767. "following function instead: "
  3768. "\r\n"
  3769. "\r\n"
  3770. " DWORD WDJ_GetDialogBaseUnits (HWND Dialog)\r\n"
  3771. " {\r\n"
  3772. "    int BaseX, BaseY;\r\n"
  3773. "    RECT R;\r\n"
  3774. "    SetRect (&R, 0, 0, 4, 8);\r\n"
  3775. "    MapDialogRect (Dialog, &R);\r\n"
  3776. "    BaseX = R.right;\r\n"
  3777. "    BaseY = R.bottom;\r\n"
  3778. "    return (DWORD)MAKELONG (BaseX, BaseY);\r\n"
  3779. " }\r\n"
  3780. "\r\n"
  3781. "Reference: p54, January 1996 Windows Developer's Journal. "
  3782. "\r\n"
  3783. "\r\n"
  3784. "\r\n"
  3785. "\0\0\0\0"
  3786. end
  3787.  
  3788. 137    RCDATA
  3789. begin
  3790.     "win32.hlp\0"
  3791.     "#129    GetShortPathName\0"
  3792.     "GetShortPathName AND \042See also\042\0"
  3793.     "GetShortPathName\0"
  3794.  
  3795. "WDJ SDK Annotation #129"
  3796. "\r\n"
  3797. "\r\n"
  3798. "The documentation fails to mention that this function returns an error "
  3799. "if the specified long path (first parameter) is invalid.  "
  3800. "\r\n"
  3801. "\r\n"
  3802. "Submitted by Ken Brown. "
  3803. "\r\n"
  3804. "\r\n"
  3805. "\0\0\0\0"
  3806. end
  3807.  
  3808. 138    RCDATA
  3809. begin
  3810.     "mfc30.hlp\0"
  3811.     "#130    CCheckListBox::Create\0"
  3812.     "CCheckListBox::Create AND \042See also\042\0"
  3813.     "CCheckListBox::Create\0"
  3814.  
  3815. "WDJ MFC Annotation #130"
  3816. "\r\n"
  3817. "\r\n"
  3818. "The documentation mentions that the dwStyle parameter could be any  "
  3819. "of the specified listbox styles. However, the dwStyle parameter should  "
  3820. "NOT be LBS_MULTICOLUMN or LBS_USETABSTOPS. Morever, you need to specify "
  3821. "LBS_OWNERDRAWFIXED and LBS_HASSTRINGS. You can specify "
  3822. "LBS_OWNERDRAWVARIABLE instead of LBS_OWNERDRAWFIXED, but then you need to "
  3823. "override CCheckListBox::DrawItem, otherwise the debug version will ASSERT. "
  3824. "\r\n"
  3825. "\r\n"
  3826. "Submitted by Sudhir Menon. "
  3827. "\r\n"
  3828. "\r\n"
  3829. "\0\0\0\0"
  3830. end
  3831.  
  3832. 139    RCDATA
  3833. begin
  3834.     "win32.hlp\0"
  3835.     "#131    TBBUTTON\0"
  3836.     "TBBUTTON AND \042See also\042\0"
  3837.     "TBBUTTON\0"
  3838.  
  3839. "WDJ SDK Annotation #131"
  3840. "\r\n"
  3841. "\r\n"
  3842. "The structure is actually defined as follows in commctrl.h. Under Win32 "
  3843. "2 extra padding bytes are added. "
  3844. "\r\n"
  3845. "\r\n"
  3846. " typedef struct _TBBUTTON {\r\n"
  3847. "    int iBitmap;\r\n"
  3848. "    int idCommand;\r\n"
  3849. "    BYTE fsState;\r\n"
  3850. "    BYTE fsStyle;\r\n"
  3851. " #ifdef _WIN32\r\n"
  3852. "    BYTE bReserved[2];\r\n"
  3853. " #endif\r\n"
  3854. "    DWORD dwData;\r\n"
  3855. "    int iString;\r\n"
  3856. " } TBBUTTON, NEAR* PTBBUTTON, FAR* LPTBBUTTON;\r\n"
  3857. " typedef const TBBUTTON FAR* LPCTBBUTTON;\r\n"
  3858. "\r\n"
  3859. "Submitted by Eric Heimburg. "
  3860. "\r\n"
  3861. "\r\n"
  3862. "\0\0\0\0"
  3863. end
  3864.  
  3865. 140    RCDATA
  3866. begin
  3867.     "win32.hlp\0"
  3868.     "#132    EM_POSFROMCHAR\0"
  3869.     "EM_POSFROMCHAR AND \042See also\042\0"
  3870.     "EM_POSFROMCHAR\0"
  3871.  
  3872. "WDJ SDK Annotation #132"
  3873. "\r\n"
  3874. "\r\n"
  3875. "The documentation for the wParam, lParam and return value is  "
  3876. "completely wrong. It should be as follows: "
  3877. "\r\n"
  3878. "\r\n"
  3879. " wParam - address of point structure to retrieve the coordinates\r\n"
  3880. " lParam - zero based index of character\r\n"
  3881. " Return value - not used\r\n"
  3882. "\r\n"
  3883. "Reference: PSS Q137805 "
  3884. "\r\n"
  3885. "\r\n"
  3886. "Submitted by Fred Heidrich. "
  3887. "\r\n"
  3888. "\r\n"
  3889. "\0\0\0\0"
  3890. end
  3891.  
  3892. 141    RCDATA
  3893. begin
  3894.     "win32.hlp\0"
  3895.     "#133    EM_CHARFROMPOS\0"
  3896.     "EM_CHARFROMPOS AND \042See also\042\0"
  3897.     "EM_CHARFROMPOS\0"
  3898.  
  3899. "WDJ SDK Annotation #133"
  3900. "\r\n"
  3901. "\r\n"
  3902. "The documentation for the lParam and return value is wrong. It  "
  3903. "should be as follows: "
  3904. "\r\n"
  3905. "\r\n"
  3906. " wParam - 0 (not used)\r\n"
  3907. " lParam - Specifies a pointer to a POINT structure that contains the\r\n"
  3908. "coordinates for the character position wanted.  "
  3909. "\r\n"
  3910. " Return value - specifies the character index\r\n"
  3911. "\r\n"
  3912. "Reference: PSS Q137805 "
  3913. "\r\n"
  3914. "\r\n"
  3915. "Submitted by Fred Heidrich. "
  3916. "\r\n"
  3917. "\r\n"
  3918. "\0\0\0\0"
  3919. end
  3920.  
  3921. 142    RCDATA
  3922. begin
  3923.     "mfc30.hlp\0"
  3924.     "#134    CEdit::PosFromChar\0"
  3925.     "CEdit::PosFromChar AND \042See also\042\0"
  3926.     "CEdit::PosFromChar\0"
  3927.  
  3928. "WDJ MFC Annotation #134"
  3929. "\r\n"
  3930. "\r\n"
  3931. "The MFC wrapper internally calls the EM_POSFROMCHAR function passing "
  3932. "the documented values. Unfortunately, there is a documentation error in "
  3933. "EM_POSFROMCHAR, and therefore PosFromChar will not work correctly.  "
  3934. "\r\n"
  3935. "\r\n"
  3936. "Read SDK Annotation #132 or PSS Q137805 for more details. "
  3937. "This error has been corrected in MFC 4.1 "
  3938. "\r\n"
  3939. "\r\n"
  3940. "\0\0\0\0"
  3941. end
  3942.  
  3943. 143    RCDATA
  3944. begin
  3945.     "mfc30.hlp\0"
  3946.     "#135    CEdit::CharFromPos\0"
  3947.     "CEdit::CharFromPos AND \042See also\042\0"
  3948.     "CEdit::CharFromPos\0"
  3949.  
  3950. "WDJ MFC Annotation #135"
  3951. "\r\n"
  3952. "\r\n"
  3953. "The MFC wrapper internally calls the EM_CHARFROMPOS function passing "
  3954. "the documented values. Unfortunately, there is a documentation error in "
  3955. "EM_CHARFROMPOS, and therefore CharFromPos will not work correctly.  "
  3956. "\r\n"
  3957. "\r\n"
  3958. "Read SDK Annotation #133 or PSS Q137805 for more details. "
  3959. "This error has been corrected in MFC 4.1 "
  3960. "\r\n"
  3961. "\r\n"
  3962. "\0\0\0\0"
  3963. end
  3964.  
  3965. 144    RCDATA
  3966. begin
  3967.     "win32.hlp\0"
  3968.     "#136    BM_SETIMAGE\0"
  3969.     "BM_SETIMAGE AND \042See also\042\0"
  3970.     "BM_SETIMAGE\0"
  3971.  
  3972. "WDJ SDK Annotation #136"
  3973. "\r\n"
  3974. "\r\n"
  3975. "The documentation for wParam is incorrect. wParam actually specifies the  "
  3976. "type of handle passed in lParam. It must be set either IMAGE_BITMAP or "
  3977. "IMAGE_ICON. "
  3978. "\r\n"
  3979. "\r\n"
  3980. "Also, this message will work only on buttons created with the  "
  3981. "BS_BITMAP or BS_ICON style. "
  3982. "\r\n"
  3983. "\r\n"
  3984. "Reference: PSS Q125673 "
  3985. "\r\n"
  3986. "\r\n"
  3987. "Submitted by Paula Tomlinson. "
  3988. "\r\n"
  3989. "\r\n"
  3990. "\0\0\0\0"
  3991. end
  3992.  
  3993. 145    RCDATA
  3994. begin
  3995.     "win31wh.hlp\0"
  3996.     "#137    GetOpenFileName\0"
  3997.     "GetOpenFileName\0"
  3998.     "GetOpenFileName\0"
  3999.  
  4000. "WDJ SDK Annotation #137"
  4001. "\r\n"
  4002. "\r\n"
  4003. "In 16-bit Windows, if you call GetOpenFileName with a string buffer of 10  "
  4004. "and set nMaxFile to 10, and the user selected a file whose full path name  "
  4005. "is 10 characters long, Windows appends a NULL character at the 11th byte  "
  4006. "and returns the filename. This behaviour remains in Win95. "
  4007. "\r\n"
  4008. "\r\n"
  4009. "Therefore, if you set nMaxFile to n, specify a buffer of length n+1 before "
  4010. "calling this function. "
  4011. "\r\n"
  4012. "\r\n"
  4013. "Reference: March TechNet CD Q137194 "
  4014. "\r\n"
  4015. "\r\n"
  4016. "Submitted by: V.Ramachandran. "
  4017. "\r\n"
  4018. "\r\n"
  4019. "\r\n"
  4020. "\0\0\0\0"
  4021. end
  4022.  
  4023. 146    RCDATA
  4024. begin
  4025.     "win32.hlp\0"
  4026.     "#137    GetOpenFileName\0"
  4027.     "GetOpenFileName AND \042See also\042\0"
  4028.     "GetOpenFileName\0"
  4029.  
  4030. "WDJ SDK Annotation #137"
  4031. "\r\n"
  4032. "\r\n"
  4033. "In 16-bit Windows, if you call GetOpenFileName with a string buffer of 10  "
  4034. "and set nMaxFile to 10, and the user selected a file whose full path name  "
  4035. "is 10 characters long, Windows appends a NULL character at the 11th byte  "
  4036. "and returns the filename. This behaviour remains in Win95. "
  4037. "\r\n"
  4038. "\r\n"
  4039. "Therefore, if you set nMaxFile to n, specify a buffer of length n+1 before "
  4040. "calling this function. "
  4041. "\r\n"
  4042. "\r\n"
  4043. "Reference: March TechNet CD Q137194 "
  4044. "\r\n"
  4045. "\r\n"
  4046. "Submitted by: V.Ramachandran. "
  4047. "\r\n"
  4048. "\r\n"
  4049. "\0\0\0\0"
  4050. end
  4051.  
  4052. 147    RCDATA
  4053. begin
  4054.     "win32.hlp\0"
  4055.     "#138    LB_DIR\0"
  4056.     "LB_DIR AND \042See also\042\0"
  4057.     "LB_DIR\0"
  4058.  
  4059. "WDJ SDK Annotation #138"
  4060. "\r\n"
  4061. "\r\n"
  4062. "Sending a LB_DIR message to a listbox that specifies a long filename in  "
  4063. "the lParam returns LB_ERR in Windows 95, but works fine under Windows  "
  4064. "NT 3.51 "
  4065. "\r\n"
  4066. "\r\n"
  4067. "In order to work around this bug, call GetShortPathName on the long "
  4068. "filename and pass the short filename to LB_DIR. "
  4069. "\r\n"
  4070. "\r\n"
  4071. "Reference: March TechNet CD Q131286 "
  4072. "\r\n"
  4073. "\r\n"
  4074. "Submitted by: V.Ramachandran. "
  4075. "\r\n"
  4076. "\r\n"
  4077. "\0\0\0\0"
  4078. end
  4079.  
  4080. 148    RCDATA
  4081. begin
  4082.     "win31wh.hlp\0"
  4083.     "#139    EM_SETSEL\0"
  4084.     "EM_SETSEL\0"
  4085.     "EM_SETSEL\0"
  4086.  
  4087. "WDJ SDK Annotation #139"
  4088. "\r\n"
  4089. "\r\n"
  4090. "The SDK documentation mentions that if wParam is 0, the caret is scrolled "
  4091. "into view, and if wParam is 1 it is not scrolled into view. However, "
  4092. "this parameter is not used for single line edit controls.  "
  4093. "\r\n"
  4094. "\r\n"
  4095. "Also, the order of the start and end positions specified in the lParam  "
  4096. "is not respected by single line edit controls. "
  4097. "\r\n"
  4098. "\r\n"
  4099. "Both wParam and lParam work as documented for multiline edit controls. "
  4100. "\r\n"
  4101. "\r\n"
  4102. "Reference: MSDN PSS Q102641, Q64758. "
  4103. "\r\n"
  4104. "\r\n"
  4105. "Submitted by: V.Ramachandran. "
  4106. "\r\n"
  4107. "\r\n"
  4108. "\0\0\0\0"
  4109. end
  4110.  
  4111. 149    RCDATA
  4112. begin
  4113.     "win32.hlp\0"
  4114.     "#140    STGM\0"
  4115.     "STGM AND \042See also\042\0"
  4116.     "STGM\0"
  4117.  
  4118. "WDJ SDK Annotation #140"
  4119. "\r\n"
  4120. "\r\n"
  4121. "The documentation fails to mention that for all storage and stream  "
  4122. "creation functions, you HAVE to specify a share mode flag. For example,  "
  4123. "a call to StgCreateDocfile with STGM_CREATE | STGM_READWRITE will fail; "
  4124. "while passing STGM_CREATE | STGM_SHARE_EXCLUSIVE | STGM_READWRITE will  "
  4125. "work correctly. "
  4126. "\r\n"
  4127. "\r\n"
  4128. "Submitted by: V.Ramachandran. "
  4129. "\r\n"
  4130. "\r\n"
  4131. "\r\n"
  4132. "\r\n"
  4133. "\0\0\0\0"
  4134. end
  4135.  
  4136. 150    RCDATA
  4137. begin
  4138.     "win32.hlp\0"
  4139.     "#141    WM_SETICON\0"
  4140.     "WM_SETICON AND \042See also\042\0"
  4141.     "WM_SETICON\0"
  4142.  
  4143. "WDJ SDK Annotation #141"
  4144. "\r\n"
  4145. "\r\n"
  4146. "Contrary to what the documentation says, Windows uses the small icon in "
  4147. "the window caption (including the caption of the minimized window).  "
  4148. "Windows uses the large icon when you press Alt+Tab to switch to another "
  4149. "application.  "
  4150. "\r\n"
  4151. "\r\n"
  4152. "\0\0\0\0"
  4153. end
  4154.  
  4155. 151    RCDATA
  4156. begin
  4157.     "win31wh.hlp\0"
  4158.     "#142    JournalRecordProc\0"
  4159.     "JournalRecordProc\0"
  4160.     "JournalRecordProc\0"
  4161.  
  4162. "WDJ SDK Annotation #142"
  4163. "\r\n"
  4164. "\r\n"
  4165. "lParam is incorrectly documented -- it actually points to a  "
  4166. "EVENTMSG structure. "
  4167. "\r\n"
  4168. "\r\n"
  4169. "\0\0\0\0"
  4170. end
  4171.  
  4172. 152    RCDATA
  4173. begin
  4174.     "win32.hlp\0"
  4175.     "#143    GetDeviceCaps\0"
  4176.     "GetDeviceCaps AND \042See also\042\0"
  4177.     "GetDeviceCaps\0"
  4178.  
  4179. "WDJ SDK Annotation #143"
  4180. "\r\n"
  4181. "\r\n"
  4182. "The documentation fails to mention 2 additional values for the  "
  4183. "index parameter: "
  4184. "\r\n"
  4185. "\r\n"
  4186. " SCALINGFACTORX - Scaling factor for the x-axis of a printer\r\n"
  4187. " SCALINGFACTORY - Scaling factor for the y-axis of a printer\r\n"
  4188. "\r\n"
  4189. "Also, GetDeviceCaps provides the following 6 indices in place of  "
  4190. "printer Escapes: "
  4191. "\r\n"
  4192. "\r\n"
  4193. "   Index for GetDeviceCaps   Printer Escape Replaced\r\n"
  4194. "   --------------------------------------------------------\r\n"
  4195. "   PHYSICALWIDTH             GETPHYSPAGESIZE\r\n"
  4196. "   PHYSICALHEIGHT            GETPHYSPAGESIZE\r\n"
  4197. "   PHYSICALOFFSETX           GETPRINTINGOFFSET\r\n"
  4198. "   PHYSICALOFFSETY           GETPRINTINGOFFSET\r\n"
  4199. "   SCALINGFACTORX            GETSCALINGFACTOR\r\n"
  4200. "   SCALINGFACTORY            GETSCALINGFACTOR\r\n"
  4201. "\r\n"
  4202. "Reference: MSDN Knowledge Base PSS Q125692 "
  4203. "\r\n"
  4204. "\r\n"
  4205. "Submitted by Sudhir Menon. "
  4206. "\r\n"
  4207. "\r\n"
  4208. "\0\0\0\0"
  4209. end
  4210.  
  4211. 153    RCDATA
  4212. begin
  4213.     "win32.hlp\0"
  4214.     "#144    MessageBoxIndirect\0"
  4215.     "MessageBoxIndirect AND \042See also\042\0"
  4216.     "MessageBoxIndirect\0"
  4217.  
  4218. "WDJ SDK Annotation #144"
  4219. "\r\n"
  4220. "\r\n"
  4221. "The documentation incorrectly mentions that this function returns a  "
  4222. "BOOL value, and gives no description of it. In fact, the return value  "
  4223. "is an int, and it has the same meaning as the return value for MessageBox. "
  4224. "\r\n"
  4225. "\r\n"
  4226. "Submitted by Phil Rodgers. "
  4227. "\r\n"
  4228. "\r\n"
  4229. "\0\0\0\0"
  4230. end
  4231.  
  4232. 154    RCDATA
  4233. begin
  4234.     "win32.hlp\0"
  4235.     "#145    LVM_EDITLABEL\0"
  4236.     "LVM_EDITLABEL AND \042See also\042\0"
  4237.     "LVM_EDITLABEL\0"
  4238.  
  4239. "WDJ SDK Annotation #145"
  4240. "\r\n"
  4241. "\r\n"
  4242. "Note that the listview control allows label editing "
  4243. "by creating a child edit control with an ID of IDOK. "
  4244. "That edit control will send notifications to the parent "
  4245. "of the listview control (e.g., your dialog box), so "
  4246. "if you have an \042OK\042 button with the same ID, do not "
  4247. "write code like this: "
  4248. "\r\n"
  4249. "\r\n"
  4250. " if(Command == IDOK)\r\n"
  4251. "     EndDialog(Dialog, TRUE);\r\n"
  4252. "\r\n"
  4253. "since the first time the user edits a label, the dialog "
  4254. "will immediately disappear as though the user pressed "
  4255. "the \042OK\042 button. Instead, use code like this: "
  4256. "\r\n"
  4257. "\r\n"
  4258. " if(Command == IDOK && Code == BN_CLICKED)\r\n"
  4259. "     EndDialog(Dialog, TRUE);\r\n"
  4260. "\r\n"
  4261. "\0\0\0\0"
  4262. end
  4263.  
  4264. 155    RCDATA
  4265. begin
  4266.     "win32.hlp\0"
  4267.     "#146    TVN_ENDLABELEDIT\0"
  4268.     "TVN_ENDLABELEDIT AND \042See also\042\0"
  4269.     "TVN_ENDLABELEDIT\0"
  4270.  
  4271. "WDJ SDK Annotation #146"
  4272. "\r\n"
  4273. "\r\n"
  4274. "When editing labels in a TreeView control which is part of a dialog,  "
  4275. "this notification is sent only if the user ends label editing using  "
  4276. "the mouse (by clicking outside the edit control). Using the Enter and  "
  4277. "Return keys do not work because the edit control does not handle the "
  4278. "WM_GETDLGCODE correctly, and therefore IsDialogMessage processes these "
  4279. "keys. "
  4280. "\r\n"
  4281. "\r\n"
  4282. "In order to make the TreeView control accept the changes when the user "
  4283. "presses Enter, and reject the changes on Escape, do the following: "
  4284. "\r\n"
  4285. "\r\n"
  4286. "1. In the TVN_BEGINLABELEDIT notification, get the edit contol handle  "
  4287. "using TVM_GETEDITCONTROL. Subclass the edit control. "
  4288. "\r\n"
  4289. "\r\n"
  4290. "2. In the subclassed procedure, handle the WM_GETDLGCODE message and "
  4291. "return WM_WANTALLKEYS.  "
  4292. "\r\n"
  4293. "\r\n"
  4294. "3. Handle the WM_CHAR message. When wParam is VK_ESCAPE, send a "
  4295. "TVM_ENDLABELEDITNOW message to the edit control with fCancel = TRUE.  "
  4296. "When wParam is VK_RETURN, send TVM_ENDLABELEDITNOW with  "
  4297. "fCancel = FALSE. All other WM_CHAR messages should be passed to the "
  4298. "default edit control procedure. "
  4299. "\r\n"
  4300. "\r\n"
  4301. "4. In the TVN_ENDLABELEDIT notification, remove the subclassing. "
  4302. "\r\n"
  4303. "\r\n"
  4304. "Reference: MSDN article PSS Q130691 "
  4305. "\r\n"
  4306. "\r\n"
  4307. "\0\0\0\0"
  4308. end
  4309.  
  4310. 156    RCDATA
  4311. begin
  4312.     "win31wh.hlp\0"
  4313.     "#147    GetWindowTextLength\0"
  4314.     "GetWindowTextLength\0"
  4315.     "GetWindowTextLength\0"
  4316.  
  4317. "WDJ SDK Annotation #147"
  4318. "\r\n"
  4319. "\r\n"
  4320. "In Windows 3.1, calling GetWindowTextLength on a drop list  "
  4321. "combo box (CBS_DROPDOWNLIST) incorrectly returns -1.  "
  4322. "\r\n"
  4323. "\r\n"
  4324. "However in Win32 (for both 16 and 32 bit applications), "
  4325. "GetWindowTextLength returns the length of the string in the static  "
  4326. "portion of the combo box. "
  4327. "\r\n"
  4328. "\r\n"
  4329. "Submitted by Sinisa Djurekovic. "
  4330. "\r\n"
  4331. "\r\n"
  4332. "\0\0\0\0"
  4333. end
  4334.  
  4335. 157    RCDATA
  4336. begin
  4337.     "win32.hlp\0"
  4338.     "#147    GetWindowTextLength\0"
  4339.     "GetWindowTextLength AND \042See also\042\0"
  4340.     "GetWindowTextLength\0"
  4341.  
  4342. "WDJ SDK Annotation #147"
  4343. "\r\n"
  4344. "\r\n"
  4345. "In Windows 3.1, calling GetWindowTextLength on a drop list  "
  4346. "combo box (CBS_DROPDOWNLIST) incorrectly returns -1.  "
  4347. "\r\n"
  4348. "\r\n"
  4349. "However in Win32 (for both 16 and 32 bit applications), "
  4350. "GetWindowTextLength returns the length of the string in the static  "
  4351. "portion of the combo box. "
  4352. "\r\n"
  4353. "\r\n"
  4354. "Submitted by Sinisa Djurekovic. "
  4355. "\r\n"
  4356. "\r\n"
  4357. "\0\0\0\0"
  4358. end
  4359.  
  4360. 158    RCDATA
  4361. begin
  4362.     "mfc30.hlp\0"
  4363.     "#147    CWnd::GetWindowText\0"
  4364.     "CWnd::GetWindowText AND CString AND Parameters\0"
  4365.     "CWnd::GetWindowText\0"
  4366.  
  4367. "WDJ MFC Annotation #147"
  4368. "\r\n"
  4369. "\r\n"
  4370. "If you call GetWindowText (CString&) on a CWnd object which specifies a  "
  4371. "Combo box with the CBS_DROPDOWNLIST style, you will get an assertion "
  4372. "in strcore.cpp. "
  4373. "\r\n"
  4374. "\r\n"
  4375. "This is because GetWindowText internally calls GetWindowTextLength.  "
  4376. "Calling GetWindowTextLength on a drop list combo box (CBS_DROPDOWNLIST) "
  4377. "incorrectly returns -1, and MFC asserts because -1 is an invalid length "
  4378. "for a CString object. "
  4379. "\r\n"
  4380. "\r\n"
  4381. "Submitted by Sinisa Djurekovic. "
  4382. "\r\n"
  4383. "\r\n"
  4384. "\0\0\0\0"
  4385. end
  4386.  
  4387. 159    RCDATA
  4388. begin
  4389.     "win32.hlp\0"
  4390.     "#148    FindFirstFile\0"
  4391.     "FindFirstFile AND \042See also\042\0"
  4392.     "FindFirstFile\0"
  4393.  
  4394. "WDJ SDK Annotation #148"
  4395. "\r\n"
  4396. "\r\n"
  4397. "In Windows 95, the FindFirstFile() function interprets a wildcard (?) as "
  4398. "\042any character\042 instead of \042zero or one character,\042 as you would expect.  "
  4399. "For example, if the files, TEMP.TXT and TEMPTEMP.TXT, are in the same "
  4400. "directory, using FindFirstFile (\042TEM?????.???\042, &findData) finds the  "
  4401. "TEMPTEMP.TXT file, but not the TEMP.TXT file: "
  4402. "\r\n"
  4403. "\r\n"
  4404. "This function works correctly under Windows NT. "
  4405. "\r\n"
  4406. "\r\n"
  4407. "Reference: MSDN PSS ID No. Q130860 "
  4408. "\r\n"
  4409. "\r\n"
  4410. "\0\0\0\0"
  4411. end
  4412.  
  4413. 160    RCDATA
  4414. begin
  4415.     "win32.hlp\0"
  4416.     "#149    CreateDirectoryEx\0"
  4417.     "CreateDirectoryEx AND \042See also\042\0"
  4418.     "CreateDirectoryEx\0"
  4419.  
  4420. "WDJ SDK Annotation #149"
  4421. "\r\n"
  4422. "\r\n"
  4423. "When you specify a template directory string with two back slashes (\\\\) "
  4424. "at the end of the string, CreateDirectoryEx returns FALSE indicating "
  4425. "error, even though the API successfully created the new directory. "
  4426. "GetLastError returns ERROR_INVALID_PARAMETER (87L). "
  4427. "\r\n"
  4428. "\r\n"
  4429. "Under Windows 95, passing \042c:\\\\\042 as the template directory (first  "
  4430. "parameter) to CreateDirectoryEx will return FALSE, even if it  "
  4431. "successfully created the new directory. "
  4432. "\r\n"
  4433. "\r\n"
  4434. "The function works correctly under Windows NT. "
  4435. "\r\n"
  4436. "\r\n"
  4437. "Reference: MSDN PSS ID No. Q140455 "
  4438. "\r\n"
  4439. " \r\n"
  4440. "\0\0\0\0"
  4441. end
  4442.  
  4443. 161    RCDATA
  4444. begin
  4445.     "mfc30.hlp\0"
  4446.     "#150    CStatusBar::SetPaneText\0"
  4447.     "CStatusBar::SetPaneText AND \042See also\042\0"
  4448.     "CStatusBar::SetPaneText\0"
  4449.  
  4450. "WDJ MFC Annotation #150"
  4451. "\r\n"
  4452. "\r\n"
  4453. "Just calling CStatusBar::SetPaneText will not display the text in the "
  4454. "status bar pane. You need to add a UI update handler for the pane for the "
  4455. "text to appear correctly. "
  4456. "\r\n"
  4457. "\r\n"
  4458. "In order to set the text for pane index 4, and id ID_PANE_FOUR do: "
  4459. "\r\n"
  4460. " SetPaneText (4, \042Some text\042, TRUE);\r\n"
  4461. "and a UI handler in the message map as follows: "
  4462. "\r\n"
  4463. " ON_UPDATE_COMMAND_UI (ID_PANE_FOUR, OnUpdatePane)\r\n"
  4464. "and in the appropriate .cpp file add: "
  4465. "\r\n"
  4466. " void CMyClass::OnUpdatePane (CCmdUI *pCmdUI)\r\n"
  4467. " {\r\n"
  4468. "    pCmdUI->Enable ();\r\n"
  4469. " }\r\n"
  4470. "\r\n"
  4471. "Reference: MSDN PSS No. Q109039 "
  4472. "\r\n"
  4473. "\r\n"
  4474. " \r\n"
  4475. "\0\0\0\0"
  4476. end
  4477.  
  4478. 162    RCDATA
  4479. begin
  4480.     "mfc30.hlp\0"
  4481.     "#151    CRecordSet::Open\0"
  4482.     "CRecordSet::Open\0"
  4483.     "CRecordSet::Open\0"
  4484.  
  4485. "WDJ MFC Annotation #151"
  4486. "\r\n"
  4487. "\r\n"
  4488. "The documentation says that, for the param dwOptions, an enum  "
  4489. "\042CRecordset::defaultOptions\042 can be specified, which will make the "
  4490. "recordset updatable. However, this enum is not defined. Use "
  4491. "\042CRecordset::none\042 instead. "
  4492. "\r\n"
  4493. "\r\n"
  4494. "Submitted by Nagendra R. "
  4495. "\r\n"
  4496. "\r\n"
  4497. "\0\0\0\0"
  4498. end
  4499.  
  4500. 163    RCDATA
  4501. begin
  4502.     "win31wh.hlp\0"
  4503.     "#152    EnumFontFamProc\0"
  4504.     "EnumFontFamProc\0"
  4505.     "EnumFontFamProc\0"
  4506.  
  4507. "WDJ SDK Annotation #152"
  4508. "\r\n"
  4509. "\r\n"
  4510. "The SDK documentation incorrectly mentions that the first parameter "
  4511. "lpnlf points to a NEWLOGFONT structure, which is not defined at all.  "
  4512. "lpnlf actually points to a ENUMLOGFONT structure. "
  4513. "\r\n"
  4514. "\r\n"
  4515. "Reference: MSDN KB Q87975 "
  4516. "\r\n"
  4517. "\r\n"
  4518. "Submitted by V.Ramachandran. "
  4519. "\r\n"
  4520. "\r\n"
  4521. "\0\0\0\0"
  4522. end
  4523.  
  4524. 164    RCDATA
  4525. begin
  4526.     "win32.hlp\0"
  4527.     "#153    WM_CANCELMODE\0"
  4528.     "WM_CANCELMODE AND \042See also\042\0"
  4529.     "WM_CANCELMODE\0"
  4530.  
  4531. "WDJ SDK Annotation #153"
  4532. "\r\n"
  4533. "\r\n"
  4534. "The WM_CANCELMODE gets sent to the active window before another dialog or "
  4535. "message box is displayed. It is not sent to the focus window as the "
  4536. "documentation claims. "
  4537. "\r\n"
  4538. "\r\n"
  4539. "Therefore if a OK Button in Dialog 1 displays Dialog 2, Dialog 1 gets a "
  4540. "WM_CANCELMODE message and not the OK button, which should have been the  "
  4541. "case as per the documentation. "
  4542. "\r\n"
  4543. "\r\n"
  4544. "Submitted by V.Ramachandran. "
  4545. "\r\n"
  4546. "\r\n"
  4547. "\0\0\0\0"
  4548. end
  4549.  
  4550. 165    RCDATA
  4551. begin
  4552.     "win32.hlp\0"
  4553.     "#154    CreateWindow\0"
  4554.     "CreateWindow AND \042See also\042\0"
  4555.     "CreateWindow\0"
  4556.  
  4557. "WDJ SDK Annotation #154"
  4558. "\r\n"
  4559. "\r\n"
  4560. "The documentation does not mention that static controls created with the "
  4561. "SS_SIMPLE style do not gray their text when they are disabled unlike "
  4562. "static controls without the SS_SIMPLE style. "
  4563. "\r\n"
  4564. "\r\n"
  4565. "Submitted by Nagendra R. "
  4566. "\r\n"
  4567. "\r\n"
  4568. "\0\0\0\0"
  4569. end
  4570.  
  4571. 166    RCDATA
  4572. begin
  4573.     "mfc30.hlp\0"
  4574.     "#155    CFileDialog::GetNextPathName\0"
  4575.     "CFileDialog::GetNextPathName\0"
  4576.     "CFileDialog::GetNextPathName\0"
  4577.  
  4578. "WDJ MFC Annotation #155"
  4579. "\r\n"
  4580. "\r\n"
  4581. "If you select multiple files in a root drive, GetNextPathName returns "
  4582. "strings with two back slashes '\\' after the drive letter. For example, if "
  4583. "you select the autoexec.bat and config.sys files from C:\\ using a multiple "
  4584. "selection file open dialog, GetNextPathName will return the strings: "
  4585. "\042c:\\\\autoexec.bat\042 and \042c:\\\\config.sys\042. This problem does not appear when "
  4586. "you select only one file. "
  4587. "\r\n"
  4588. "\r\n"
  4589. "A workaround would be to check the strings returned by GetNextPathName for "
  4590. "double back slashes, and remove them yourself. "
  4591. "\r\n"
  4592. "\r\n"
  4593. " CString sFile = dlg.GetNextPathName (pos);\r\n"
  4594. " #if _MFC_VER >= 0x0400\r\n"
  4595. " if ((sFile [1] == ':') && (sFile [2] == '\\\\') && (sFile [3] == '\\\\')) {\r\n"
  4596. "    sFile = sFile.Left (3) + sFile.Right (sFile.GetLength () - 4);\r\n"
  4597. " }\r\n"
  4598. " #endif // end of MFC 4.x hack!\r\n"
  4599. "\r\n"
  4600. "Submitted by David Lowndes. "
  4601. "\r\n"
  4602. "\r\n"
  4603. "\0\0\0\0"
  4604. end
  4605.  
  4606. 167    RCDATA
  4607. begin
  4608.     "mfc30.hlp\0"
  4609.     "#156    CToolTipCtrl::GetToolInfo\0"
  4610.     "CToolTipCtrl::GetToolInfo\0"
  4611.     "CToolTipCtrl::GetToolInfo\0"
  4612.  
  4613. "WDJ MFC Annotation #156"
  4614. "\r\n"
  4615. "\r\n"
  4616. "The documentation incorrectly states that the first parameter should be  "
  4617. "of type LPTOOLINFO. The function actually accepts a CToolInfo& (reference "
  4618. "to a undocumented CToolInfo class). If the call succeeds, the szText  "
  4619. "parameter of the CToolInfo variable contains the tooltip text.  "
  4620. "\r\n"
  4621. "\r\n"
  4622. "Submitted by Paul Stemper. "
  4623. "\r\n"
  4624. "\r\n"
  4625. "\0\0\0\0"
  4626. end
  4627.  
  4628. 168    RCDATA
  4629. begin
  4630.     "mfc30.hlp\0"
  4631.     "#157    CToolTipCtrl::AddTool\0"
  4632.     "CToolTipCtrl::AddTool\0"
  4633.     "CToolTipCtrl::AddTool\0"
  4634.  
  4635. "WDJ MFC Annotation #157"
  4636. "\r\n"
  4637. "\r\n"
  4638. "The documentation fails to mention that you cannot set a tooltip to a "
  4639. "static control using the AddTool function. "
  4640. "\r\n"
  4641. "\r\n"
  4642. "Submitted by Sudhir Menon. "
  4643. "\r\n"
  4644. "\r\n"
  4645. "\0\0\0\0"
  4646. end
  4647.  
  4648. 169    RCDATA
  4649. begin
  4650.     "mfc30.hlp\0"
  4651.     "#158    CTreeCtrl::GetNextVisibleItem\0"
  4652.     "CTreeCtrl::GetNextVisibleItem\0"
  4653.     "CTreeCtrl::GetNextVisibleItem\0"
  4654.  
  4655. "WDJ MFC Annotation #158"
  4656. "\r\n"
  4657. "\r\n"
  4658. "GetNextVisibleItem and GetPrevVisibleItem return the next "
  4659. "or previous item, not the next or previous visible item. "
  4660. "\r\n"
  4661. "\r\n"
  4662. "Submitted by Mark Gorokhov. "
  4663. "\r\n"
  4664. "\r\n"
  4665. "\0\0\0\0"
  4666. end
  4667.  
  4668. 170    RCDATA
  4669. begin
  4670.     "mfc30.hlp\0"
  4671.     "#158    CTreeCtrl::GetPrevVisibleItem\0"
  4672.     "CTreeCtrl::GetPrevVisibleItem\0"
  4673.     "CTreeCtrl::GetPrevVisibleItem\0"
  4674.  
  4675. "WDJ MFC Annotation #158"
  4676. "\r\n"
  4677. "\r\n"
  4678. "GetNextVisibleItem and GetPrevVisibleItem return the next "
  4679. "or previous item, not the next or previous visible item. "
  4680. "\r\n"
  4681. "\r\n"
  4682. "Submitted by Mark Gorokhov. "
  4683. "\r\n"
  4684. "\r\n"
  4685. "\0\0\0\0"
  4686. end
  4687.  
  4688. 171    RCDATA
  4689. begin
  4690.     "mfc30.hlp\0"
  4691.     "#159    CFontDialog::GetCurrentFont\0"
  4692.     "CFontDialog::GetCurrentFont\0"
  4693.     "CFontDialog::GetCurrentFont\0"
  4694.  
  4695. "WDJ MFC Annotation #159"
  4696. "\r\n"
  4697. "\r\n"
  4698. "Though the documentation mentions that you can call this function after "
  4699. "calling DoModal, the function incorrectly ASSERTS that its window handle  "
  4700. "is not NULL. "
  4701. "\r\n"
  4702. "\r\n"
  4703. "Instead, use the public CFontDialog member variable m_lf. "
  4704. "\r\n"
  4705. "\r\n"
  4706. "Submitted by Tim Lesher. "
  4707. "\r\n"
  4708. "\r\n"
  4709. "\0\0\0\0"
  4710. end
  4711.  
  4712. 172    RCDATA
  4713. begin
  4714.     "win32.hlp\0"
  4715.     "#160    WM_MOVE\0"
  4716.     "WM_MOVE AND \042See also\042\0"
  4717.     "WM_MOVE\0"
  4718.  
  4719. "WDJ SDK Annotation #160"
  4720. "\r\n"
  4721. "\r\n"
  4722. "The SDK documentation tells you to use the following two lines to calculate "
  4723. "the x, and y positions of the window after it has been moved. "
  4724. "\r\n"
  4725. "\r\n"
  4726. " xPos = (int) LOWORD(lParam);    // horizontal position\r\n"
  4727. " yPos = (int) HIWORD(lParam);    // vertical position\r\n"
  4728. "\r\n"
  4729. "Though this worked fine in 16-bit Windows, it will fail for negative "
  4730. "coordinates in 32-bit Windows. Instead use the following two lines to "
  4731. "calculate the coordinates: "
  4732. "\r\n"
  4733. "\r\n"
  4734. " xPos = (int) (short)LOWORD(lParam);    // horizontal position\r\n"
  4735. " yPos = (int)(short) HIWORD(lParam);    // vertical position\r\n"
  4736. "\r\n"
  4737. "Submitted by Steven M. Kinney. "
  4738. "\r\n"
  4739. "\r\n"
  4740. "\0\0\0\0"
  4741. end
  4742.  
  4743. 173    RCDATA
  4744. begin
  4745.     "mfc30.hlp\0"
  4746.     "#161    CWnd::OnMove\0"
  4747.     "CWnd::OnMove AND Parameters NOT LPRECT\0"
  4748.     "CWnd::OnMove\0"
  4749.  
  4750. "WDJ MFC Annotation #161"
  4751. "\r\n"
  4752. "\r\n"
  4753. "MFC supplies LOWORD (lParam) and HIWORD (lParam) of the WM_MOVE message  "
  4754. "for the x, and y parameters of this function, respectively. Since x and y "
  4755. "are defined as integers, you will get very large numbers for negative "
  4756. "coordinates. "
  4757. "\r\n"
  4758. "\r\n"
  4759. "Whenever you want to handle the WM_MOVE message, do the following: "
  4760. "1. Define a message handler: ON_MESSAGE (WM_MOVE, OnMyMove) in the message "
  4761. "\r\n"
  4762. "   map.\r\n"
  4763. "2. Write the OnMyMove function as follows: "
  4764. "\r\n"
  4765. "    LRESULT ClassName::OnMyMove (WPARAM, LPARAM lParam)\r\n"
  4766. "    {\r\n"
  4767. "        x = (int) (short)LOWORD(lParam);    // horizontal position\r\n"
  4768. "        y = (int)(short) HIWORD(lParam);    // vertical position\r\n"
  4769. "\r\n"
  4770. "        // Do your processing here ...\r\n"
  4771. "\r\n"
  4772. "        return Default ();\r\n"
  4773. "    }\r\n"
  4774. "\r\n"
  4775. "Submitted by Steven M. Kinney. "
  4776. "\r\n"
  4777. "\r\n"
  4778. "\0\0\0\0"
  4779. end
  4780.  
  4781. 174    RCDATA
  4782. begin
  4783.     "mfc30.hlp\0"
  4784.     "#162    CRecordset::Delete\0"
  4785.     "CRecordset::Delete AND Remarks NOT Symptoms\0"
  4786.     "CRecordset::Delete\0"
  4787.  
  4788. "WDJ MFC Annotation #162"
  4789. "\r\n"
  4790. "\r\n"
  4791. "This function is incorrectly documented as returning BOOL. It actually "
  4792. "returns void. "
  4793. "\r\n"
  4794. "\r\n"
  4795. "This documentation error has been corrected in MFC 4.x "
  4796. "\r\n"
  4797. "\r\n"
  4798. "Submitted by Tushar Bhatia. "
  4799. "\r\n"
  4800. "\r\n"
  4801. "\r\n"
  4802. "\0\0\0\0"
  4803. end
  4804.  
  4805. 175    RCDATA
  4806. begin
  4807.     "win32.hlp\0"
  4808.     "#163    EM_GETLINE\0"
  4809.     "EM_GETLINE AND \042See also\042\0"
  4810.     "EM_GETLINE\0"
  4811.  
  4812. "WDJ SDK Annotation #163"
  4813. "\r\n"
  4814. "\r\n"
  4815. "When using this message under Win32s (1.30a and above) with "
  4816. "the RichEdit control, the parameters the message takes are: "
  4817. "\r\n"
  4818. "\r\n"
  4819. "    wParam = 0;\r\n"
  4820. "    lParam = &em32s;\r\n"
  4821. "\r\n"
  4822. "Where em32s is a structure defined as: "
  4823. "\r\n"
  4824. "\r\n"
  4825. "    struct EM32S {\r\n"
  4826. "        DWORD wParam;\r\n"
  4827. "        DWORD lParam;\r\n"
  4828. "        };\r\n"
  4829. "\r\n"
  4830. "The documented wParam and lParam values are stored in the "
  4831. "EM32S structure.  "
  4832. "\r\n"
  4833. "\r\n"
  4834. "Submitted by Larry Widing. "
  4835. "\r\n"
  4836. "\r\n"
  4837. "\0\0\0\0"
  4838. end
  4839.  
  4840. 176    RCDATA
  4841. begin
  4842.     "win32.hlp\0"
  4843.     "#163    EM_LINEINDEX\0"
  4844.     "EM_LINEINDEX AND \042See also\042\0"
  4845.     "EM_LINEINDEX\0"
  4846.  
  4847. "WDJ SDK Annotation #163"
  4848. "\r\n"
  4849. "\r\n"
  4850. "When using this message under Win32s (1.30a and above) with "
  4851. "the RichEdit control, the parameters the message takes are: "
  4852. "\r\n"
  4853. "\r\n"
  4854. "    wParam = 0;\r\n"
  4855. "    lParam = &em32s;\r\n"
  4856. "\r\n"
  4857. "Where em32s is a structure defined as: "
  4858. "\r\n"
  4859. "\r\n"
  4860. "    struct EM32S {\r\n"
  4861. "        DWORD wParam;\r\n"
  4862. "        DWORD lParam;\r\n"
  4863. "        };\r\n"
  4864. "\r\n"
  4865. "The documented wParam and lParam values are stored in the "
  4866. "EM32S structure.  "
  4867. "\r\n"
  4868. "\r\n"
  4869. "Submitted by Larry Widing. "
  4870. "\r\n"
  4871. "\r\n"
  4872. "\0\0\0\0"
  4873. end
  4874.  
  4875. 177    RCDATA
  4876. begin
  4877.     "win32.hlp\0"
  4878.     "#163    EM_LINELENGTH\0"
  4879.     "EM_LINELENGTH AND \042See also\042\0"
  4880.     "EM_LINELENGTH\0"
  4881.  
  4882. "WDJ SDK Annotation #163"
  4883. "\r\n"
  4884. "\r\n"
  4885. "When using this message under Win32s (1.30a and above) with "
  4886. "the RichEdit control, the parameters the message takes are: "
  4887. "\r\n"
  4888. "\r\n"
  4889. "    wParam = 0;\r\n"
  4890. "    lParam = &em32s;\r\n"
  4891. "\r\n"
  4892. "Where em32s is a structure defined as: "
  4893. "\r\n"
  4894. "\r\n"
  4895. "    struct EM32S {\r\n"
  4896. "        DWORD wParam;\r\n"
  4897. "        DWORD lParam;\r\n"
  4898. "        };\r\n"
  4899. "\r\n"
  4900. "The documented wParam and lParam values are stored in the "
  4901. "EM32S structure.  "
  4902. "\r\n"
  4903. "\r\n"
  4904. "Submitted by Larry Widing. "
  4905. "\r\n"
  4906. "\r\n"
  4907. "\0\0\0\0"
  4908. end
  4909.  
  4910. 178    RCDATA
  4911. begin
  4912.     "win32.hlp\0"
  4913.     "#163    EM_LINESCROLL\0"
  4914.     "EM_LINESCROLL AND \042See also\042\0"
  4915.     "EM_LINESCROLL\0"
  4916.  
  4917. "WDJ SDK Annotation #163"
  4918. "\r\n"
  4919. "\r\n"
  4920. "When using this message under Win32s (1.30a and above) with the RichEdit  "
  4921. "control, the parameters the message takes are: "
  4922. "\r\n"
  4923. "\r\n"
  4924. "    wParam = 0;\r\n"
  4925. "    lParam = &em32s;\r\n"
  4926. "\r\n"
  4927. "Where em32s is a structure defined as: "
  4928. "\r\n"
  4929. "\r\n"
  4930. "    struct EM32S {\r\n"
  4931. "        DWORD wParam;\r\n"
  4932. "        DWORD lParam;\r\n"
  4933. "        };\r\n"
  4934. "\r\n"
  4935. "The documented wParam and lParam values are stored in the EM32S structure. "
  4936. "\r\n"
  4937. "\r\n"
  4938. "Submitted by Larry Widing. "
  4939. "\r\n"
  4940. "\r\n"
  4941. "\0\0\0\0"
  4942. end
  4943.  
  4944. 179    RCDATA
  4945. begin
  4946.     "win32.hlp\0"
  4947.     "#164    EDITSTREAM\0"
  4948.     "EDITSTREAM AND \042See also\042\0"
  4949.     "EDITSTREAM\0"
  4950.  
  4951. "WDJ SDK Annotation #164"
  4952. "\r\n"
  4953. "\r\n"
  4954. "The return value from this function is incorrectly "
  4955. "documented.  The return value from the EditStreamCallback is "
  4956. "interpreted as an SCODE - you should return 0 to indicate "
  4957. "success or an error code otherwise (both while reading and "
  4958. "writing).  "
  4959. "\r\n"
  4960. "\r\n"
  4961. "Reference: MSDN KB article Q136810 "
  4962. "\r\n"
  4963. "\r\n"
  4964. "Submitted by Donald Munro.  "
  4965. "\r\n"
  4966. "\r\n"
  4967. "\0\0\0\0"
  4968. end
  4969.  
  4970. 180    RCDATA
  4971. begin
  4972.     "win31wh.hlp\0"
  4973.     "#165    GetNextDlgGroupItem\0"
  4974.     "GetNextDlgGroupItem\0"
  4975.     "GetNextDlgGroupItem\0"
  4976.  
  4977. "WDJ SDK Annotation #165"
  4978. "\r\n"
  4979. "\r\n"
  4980. "The Win16 SDK fails to mention that this function ignores "
  4981. "controls that are part of the group but are disabled.  The "
  4982. "documentation has been corrected in Win32.  "
  4983. "\r\n"
  4984. "\r\n"
  4985. "If you use MFC, check out Annotation #166 (DDX_Radio) for "
  4986. "this bug's repercussions.  "
  4987. "\r\n"
  4988. "\r\n"
  4989. "\0\0\0\0"
  4990. end
  4991.  
  4992. 181    RCDATA
  4993. begin
  4994.     "mfc30.hlp\0"
  4995.     "#166    DDX_Radio\0"
  4996.     "DDX_Radio\0"
  4997.     "DDX_Radio\0"
  4998.  
  4999. "WDJ MFC Annotation #166"
  5000. "\r\n"
  5001. "\r\n"
  5002. "DDX_Radio internally uses GetNextDlgGroupItem (see SDK "
  5003. "annotation #165) and therefore ignores disabled "
  5004. "radio-buttons.  This could causes 2 radio buttons in the "
  5005. "same group to be selected, if a disabled radio-button is "
  5006. "selected.  Generally, you are better off not using this "
  5007. "function if you are going to enable/disable radio-buttons.  "
  5008. "Use the Windows SDK functions instead.  This applies to MFC "
  5009. "1.x and 2.x.  "
  5010. "\r\n"
  5011. "\r\n"
  5012. "Reference: MSDN KB Q114980 "
  5013. "\r\n"
  5014. "\r\n"
  5015. "\0\0\0\0"
  5016. end
  5017.  
  5018. 182    RCDATA
  5019. begin
  5020.     "win32.hlp\0"
  5021.     "#167    CreatePen\0"
  5022.     "CreatePen AND \042See also\042\0"
  5023.     "CreatePen\0"
  5024.  
  5025. "WDJ SDK Annotation #167"
  5026. "\r\n"
  5027. "\r\n"
  5028. "If you specify a width greater than 1 for one of the the "
  5029. "following styles - PS_DASH, PS_DOT, PS_DASHDOT, "
  5030. "PS_DASHDOTDOT, CreatePen returns a pen with the specified "
  5031. "width but with the PS_SOLID style.  "
  5032. "\r\n"
  5033. "\r\n"
  5034. "Submitted by Muthuvale Shanmugam. "
  5035. "\r\n"
  5036. "\r\n"
  5037. "\0\0\0\0"
  5038. end
  5039.  
  5040. 183    RCDATA
  5041. begin
  5042.     "win32.hlp\0"
  5043.     "#168    WindowFromPoint\0"
  5044.     "WindowFromPoint AND \042See also\042\0"
  5045.     "WindowFromPoint\0"
  5046.  
  5047. "WDJ SDK Annotation #168"
  5048. "\r\n"
  5049. "\r\n"
  5050. "If given a point over a static control, WindowFromPoint() "
  5051. "returns the handle of the window \042under\042 the static text control. "
  5052. "\r\n"
  5053. "\r\n"
  5054. "Submitted by Muthuvale Shanmugam. "
  5055. "\r\n"
  5056. "\r\n"
  5057. "\0\0\0\0"
  5058. end
  5059.  
  5060. 184    RCDATA
  5061. begin
  5062.     "win32.hlp\0"
  5063.     "#169    TranslateMessage\0"
  5064.     "TranslateMessage AND \042See also\042\0"
  5065.     "TranslateMessage\0"
  5066.  
  5067. "WDJ SDK Annotation #169"
  5068. "\r\n"
  5069. "\r\n"
  5070. "Though the documentation mentions that it returns TRUE only "
  5071. "if it translates message, it actually returns TRUE for all "
  5072. "WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN and WM_SYSKEYUP "
  5073. "messages.  This behaviour is consistent with Windows 3.1 "
  5074. "\r\n"
  5075. "\r\n"
  5076. "Reference: MSDN KB Q137231 "
  5077. "\r\n"
  5078. "\r\n"
  5079. "\r\n"
  5080. "\r\n"
  5081. "\0\0\0\0"
  5082. end
  5083.  
  5084. 185    RCDATA
  5085. begin
  5086.     "win32.hlp\0"
  5087.     "#170    LoadLibrary\0"
  5088.     "LoadLibrary AND \042See also\042\0"
  5089.     "LoadLibrary\0"
  5090.  
  5091. "WDJ SDK Annotation #170"
  5092. "\r\n"
  5093. "\r\n"
  5094. "When writing code for a Win32 DLL, you may be tempted to "
  5095. "use declare thread-local variables using Windows-specific "
  5096. "keywords like this: "
  5097. "\r\n"
  5098. "\r\n"
  5099. "  __declspec(thread) int  ThisThreadStatus;\r\n"
  5100. "\r\n"
  5101. "If you do, however, then the resulting DLL can only be "
  5102. "loaded implicitly (by linking with an import library). "
  5103. "If any program tries to use LoadLibrary() or LoadLibraryEx() "
  5104. "to load such a DLL, the call will fail and GetLastError() "
  5105. "will report a code of 1114L (DLL initialization failed), "
  5106. "even though your DLL's entry point never gets called. "
  5107. "\r\n"
  5108. "\r\n"
  5109. "The only work around is to simply not use __declspec(thread) "
  5110. "in your DLL. Either use the TlsXxxx() functions to allocate "
  5111. "thread-local storage, or use your own algorithm for associating "
  5112. "data with thread handles. "
  5113. "\r\n"
  5114. "\r\n"
  5115. "\r\n"
  5116. "\0\0\0\0"
  5117. end
  5118.  
  5119. 186    RCDATA
  5120. begin
  5121.     "win32.hlp\0"
  5122.     "#171    GetLastError\0"
  5123.     "GetLastError AND \042See also\042 NOT MAPIERROR\0"
  5124.     "GetLastError\0"
  5125.  
  5126. "WDJ SDK Annotation #171"
  5127. "\r\n"
  5128. "\r\n"
  5129. "Some versions of the documentation for GetLastError() state "
  5130. "that a listing of the error codes is found in WINNT.H.  The "
  5131. "list of error codes is actually found in the file "
  5132. "WINERROR.H.  "
  5133. "\r\n"
  5134. "\r\n"
  5135. "Submitted by Katy Mulvey. "
  5136. "\r\n"
  5137. "\r\n"
  5138. "\r\n"
  5139. "\0\0\0\0"
  5140. end
  5141.  
  5142. 187    RCDATA
  5143. begin
  5144.     "win32.hlp\0"
  5145.     "#172    WaitForMultipleObjects\0"
  5146.     "WaitForMultipleObjects AND \042See also\042\0"
  5147.     "WaitForMultipleObjects\0"
  5148.  
  5149. "WDJ SDK Annotation #172"
  5150. "\r\n"
  5151. "\r\n"
  5152. "The Windows 95 implementation of this function "
  5153. "has a bug (see the reference for a complete "
  5154. "explanation). If the same thread claims a mutex "
  5155. "more than once, then a second thread calls "
  5156. "WaitForMultipleObjects() to wait on that mutex and at "
  5157. "least one other object, WaitForMultipleObjects() will "
  5158. "incorrectly consider the mutex free when the other "
  5159. "objects being waited on become signaled. "
  5160. "\r\n"
  5161. "\r\n"
  5162. "Reference: p. 44, December 1996 Windows Developer's Journal "
  5163. "\r\n"
  5164. "\r\n"
  5165. "\r\n"
  5166. "\r\n"
  5167. "\r\n"
  5168. "\0\0\0\0"
  5169. end
  5170.  
  5171. 188    RCDATA
  5172. begin
  5173.     "win32.hlp\0"
  5174.     "#173    TBBUTTON\0"
  5175.     "TBBUTTON AND \042See also\042\0"
  5176.     "TBBUTTON\0"
  5177.  
  5178. "WDJ SDK Annotation #173"
  5179. "\r\n"
  5180. "\r\n"
  5181. "The documentation incorrectly claims that for "
  5182. "separators (fsStyle equal to TBSTYLE_SEP), the "
  5183. "idCommand field must be zero. In fact, you can "
  5184. "assign toolbar separators a non-zero ID. In fact, "
  5185. "it is important to assign unique IDs to separators "
  5186. "if they have non-default widths so the customization "
  5187. "features will work properly. Also, it's a common "
  5188. "technique to use a \042fat\042 separator as a placeholder "
  5189. "for a control (such as a drop-down listbox) that you "
  5190. "want to appear on the toolbox. You will need to "
  5191. "assign such separators a non-zero ID so that you "
  5192. "can locate the correct position for the control. "
  5193. "\r\n"
  5194. "\r\n"
  5195. "\r\n"
  5196. "Reference: p. 45, November 1996 Windows Developer's Journal "
  5197. "\r\n"
  5198. "\r\n"
  5199. "\r\n"
  5200. "\r\n"
  5201. "\r\n"
  5202. "\0\0\0\0"
  5203. end
  5204.  
  5205. 189    RCDATA
  5206. begin
  5207.     "win32.hlp\0"
  5208.     "#174    WM_GETDLGCODE\0"
  5209.     "WM_GETDLGCODE AND \042See also\042\0"
  5210.     "WM_GETDLGCODE\0"
  5211.  
  5212. "WDJ SDK Annotation #174"
  5213. "\r\n"
  5214. "\r\n"
  5215. "\r\n"
  5216. "If a 32-bit control returns DLGC_HASSETSEL, Windows 95 will not send a "
  5217. "EM_SETSEL message when the control gets the focus.  Instead, Windows 95 "
  5218. "sends the control a message with the same value as the 16-bit EM_SETSEL "
  5219. "(0x401) with 16-bit style parameters.  Under Windows NT, your control "
  5220. "will get the normal 32-bit EM_SETSEL message.  "
  5221. "\r\n"
  5222. "\r\n"
  5223. "Note: Under Win32, the EM_ messages start at 0xB0 and not at WM_USER "
  5224. "(0x400) as they did in Win16. "
  5225. "\r\n"
  5226. "\r\n"
  5227. "Submitted by Robert Mashlan. "
  5228. "\r\n"
  5229. "\r\n"
  5230. "\r\n"
  5231. "\0\0\0\0"
  5232. end
  5233.  
  5234. 190    RCDATA
  5235. begin
  5236.     "win32.hlp\0"
  5237.     "#175    GetRegionData\0"
  5238.     "GetRegionData AND \042See also\042\0"
  5239.     "GetRegionData\0"
  5240.  
  5241. "WDJ SDK Annotation #175"
  5242. "\r\n"
  5243. "\r\n"
  5244. "The documentation for the return value is incorrect.  If the "
  5245. "function succeeds and dwCount specifies an adequate number "
  5246. "of bytes, the return value is always dwCount.  If the "
  5247. "function fails or if dwCount specifies less than adequate "
  5248. "number of bytes, the return value is 0.  "
  5249. "\r\n"
  5250. "\r\n"
  5251. "Submitted by Peter C. Jahans. "
  5252. "\r\n"
  5253. "\r\n"
  5254. "\0\0\0\0"
  5255. end
  5256.  
  5257. 191    RCDATA
  5258. begin
  5259.     "mfc30.hlp\0"
  5260.     "#175    CRgn::GetRegionData\0"
  5261.     "CRgn::GetRegionData\0"
  5262.     "CRgn::GetRegionData\0"
  5263.  
  5264. "WDJ MFC Annotation #175"
  5265. "\r\n"
  5266. "\r\n"
  5267. "The documentation for the return value is incorrect.  If the "
  5268. "function succeeds and dwCount specifies an adequate number "
  5269. "of bytes, the return value is always dwCount.  If the "
  5270. "function fails or if dwCount specifies less than adequate "
  5271. "number of bytes, the return value is 0 (ERROR).  "
  5272. "\r\n"
  5273. "\r\n"
  5274. "Submitted by Peter C. Jahans. "
  5275. "\r\n"
  5276. "\r\n"
  5277. "\0\0\0\0"
  5278. end
  5279.  
  5280. 192    RCDATA
  5281. begin
  5282.     "win32.hlp\0"
  5283.     "#176    DrawFocusRect\0"
  5284.     "DrawFocusRect AND \042See also\042\0"
  5285.     "DrawFocusRect\0"
  5286.  
  5287. "WDJ SDK Annotation #176"
  5288. "\r\n"
  5289. "\r\n"
  5290. "DrawFocusRect() works only in MM_TEXT mode.  In other "
  5291. "modes, this function does not draw the focus rectangle "
  5292. "correctly, but it does NOT return error values! "
  5293. "\r\n"
  5294. "\r\n"
  5295. "Submitted by Jon-David Wiesman. "
  5296. "\r\n"
  5297. "\r\n"
  5298. "\0\0\0\0"
  5299. end
  5300.  
  5301. 193    RCDATA
  5302. begin
  5303.     "mfc30.hlp\0"
  5304.     "#176    CDC::DrawFocusRect\0"
  5305.     "CDC::DrawFocusRect\0"
  5306.     "CDC::DrawFocusRect\0"
  5307.  
  5308. "WDJ MFC Annotation #176"
  5309. "\r\n"
  5310. "\r\n"
  5311. "CDC::DrawFocusRect() works only in MM_TEXT mode.  In other "
  5312. "modes, this function does not draw the focus rectangle "
  5313. "correctly, but it does NOT return error values! "
  5314. "\r\n"
  5315. "\r\n"
  5316. "Submitted by Jon-David Wiesman. "
  5317. "\r\n"
  5318. "\r\n"
  5319. "\0\0\0\0"
  5320. end
  5321.  
  5322. 194    RCDATA
  5323. begin
  5324.     "win32.hlp\0"
  5325.     "#177    FSCTL_DISMOUNT_VOLUME\0"
  5326.     "FSCTL_DISMOUNT_VOLUME AND \042See also\042\0"
  5327.     "FSCTL_DISMOUNT_VOLUME\0"
  5328.  
  5329. "WDJ SDK Annotation #177"
  5330. "\r\n"
  5331. "\r\n"
  5332. "The SDK documentation for this function mentions \042If the "
  5333. "specified volume is locked, the operation fails.\042 This is "
  5334. "incorrect.  It should actually read \042If the specified volume "
  5335. "is locked by another process, the operation fails.\042 You must "
  5336. "do an FSCTL_LOCK_VOLUME before you can do an "
  5337. "FSCTL_DISMOUNT_VOLUME. "
  5338. "\r\n"
  5339. "\r\n"
  5340. "Also, in the sequence of events for reformatting FAT to NTFS "
  5341. "as described in the same article, steps 4 and 5 must be "
  5342. "switched - you need to dismount the volume before you unlock "
  5343. "the volume.  "
  5344. "\r\n"
  5345. "\r\n"
  5346. "Submitted by Jeffrey S. Goldner. "
  5347. "\r\n"
  5348. "\r\n"
  5349. "\0\0\0\0"
  5350. end
  5351.  
  5352. 195    RCDATA
  5353. begin
  5354.     "win32.hlp\0"
  5355.     "#178    CreateProcess\0"
  5356.     "CreateProcess AND \042See also\042\0"
  5357.     "CreateProcess\0"
  5358.  
  5359. "WDJ SDK Annotation #178"
  5360. "\r\n"
  5361. "\r\n"
  5362. "If you call CreateProcess() with a dwCreationFlags value "
  5363. "which includes DEBUG_PROCESS, the call will fail under Win95 "
  5364. "when the debugee is a 16-bit app.  "
  5365. "\r\n"
  5366. "\r\n"
  5367. "Submitted by Marc Cousineau. "
  5368. "\r\n"
  5369. "\r\n"
  5370. "\0\0\0\0"
  5371. end
  5372.  
  5373. 196    RCDATA
  5374. begin
  5375.     "win32.hlp\0"
  5376.     "#179    WM_ACTIVATE\0"
  5377.     "WM_ACTIVATE AND \042See also\042\0"
  5378.     "WM_ACTIVATE\0"
  5379.  
  5380. "WDJ SDK Annotation #179"
  5381. "\r\n"
  5382. "\r\n"
  5383. "The documentation states that the message is sent first to "
  5384. "the top-level window being deactivated and then to the "
  5385. "window being activated.  This is incorrect in Win32.  In "
  5386. "Win32, activation is asynchronous - the activating "
  5387. "application becomes active immediately and the messages to "
  5388. "the deactivating application occur later.  "
  5389. "\r\n"
  5390. "\r\n"
  5391. "Reference: MSDN KB Article Q135785 "
  5392. "\r\n"
  5393. "\r\n"
  5394. "Submitted by V.Ramachandran. "
  5395. "\r\n"
  5396. "\r\n"
  5397. "\0\0\0\0"
  5398. end
  5399.  
  5400. 197    RCDATA
  5401. begin
  5402.     "mfc30.hlp\0"
  5403.     "#179    CWnd::OnActivate\0"
  5404.     "CWnd::OnActivate\0"
  5405.     "CWnd::OnActivate\0"
  5406.  
  5407. "WDJ MFC Annotation #179"
  5408. "\r\n"
  5409. "\r\n"
  5410. "The documentation states that first OnActivate() is called "
  5411. "for the main window being deactivated, and then for the main "
  5412. "window being activated This is incorrect in Win32.  In "
  5413. "Win32, activation is asynchronous - the activating "
  5414. "application becomes immediately and the messages to the "
  5415. "deactivating application occur later.  "
  5416. "\r\n"
  5417. "\r\n"
  5418. "Reference: MSDN KB Article Q135785 "
  5419. "\r\n"
  5420. "\r\n"
  5421. "Submitted by V.Ramachandran. "
  5422. "\r\n"
  5423. "\r\n"
  5424. "\0\0\0\0"
  5425. end
  5426.  
  5427. 198    RCDATA
  5428. begin
  5429.     "win32.hlp\0"
  5430.     "#180    DRAWITEMSTRUCT\0"
  5431.     "DRAWITEMSTRUCT AND \042See also\042\0"
  5432.     "DRAWITEMSTRUCT\0"
  5433.  
  5434. "WDJ SDK Annotation #180"
  5435. "\r\n"
  5436. "\r\n"
  5437. "Listviews always set the itemAction member to "
  5438. "ODA_DRAWENTIRE.  You need to check the itemState member to "
  5439. "check if the focus or selection needs to be updated.  "
  5440. "\r\n"
  5441. "\r\n"
  5442. "Reference: MSDN KB Article Q131788 "
  5443. "\r\n"
  5444. "\r\n"
  5445. "Submitted by V.Ramachandran. "
  5446. "\r\n"
  5447. "\r\n"
  5448. "\0\0\0\0"
  5449. end
  5450.  
  5451. 199    RCDATA
  5452. begin
  5453.     "mfc30.hlp\0"
  5454.     "#181    CInternetSession::ServiceTypeFromHandle\0"
  5455.     "CInternetSession::ServiceTypeFromHandle\0"
  5456.     "CInternetSession::ServiceTypeFromHandle\0"
  5457.  
  5458. "WDJ MFC Annotation #181"
  5459. "\r\n"
  5460. "\r\n"
  5461. "The on-line help states "
  5462. "CInternetSession::ServiceTypeFromHandle() returns the type "
  5463. "of service given the internet handle.  Although this "
  5464. "function is declared in afxinet.h, it is not defined "
  5465. "anywhere.  Using this function will cause your program to "
  5466. "fail at link time.  "
  5467. "\r\n"
  5468. "\r\n"
  5469. "Submitted by Mario Contestabile. "
  5470. "\r\n"
  5471. "\r\n"
  5472. "\0\0\0\0"
  5473. end
  5474.  
  5475. 200    RCDATA
  5476. begin
  5477.     "mfc30.hlp\0"
  5478.     "#182    CHttpFile::QueryInfo\0"
  5479.     "CHttpFile::QueryInfo\0"
  5480.     "CHttpFile::QueryInfo\0"
  5481.  
  5482. "WDJ MFC Annotation #182"
  5483. "\r\n"
  5484. "\r\n"
  5485. "The documentation for CHttpFile::QueryInfo() erroneously states some of "
  5486. "the possible values for lpdwIndex and dwIndex:  "
  5487. "\r\n"
  5488. "\r\n"
  5489. " HTTP_QUERY_LANGUAGE is actually HTTP_QUERY_CONTENT_LANGUAGE\r\n"
  5490. " HTTP_QUERY_ALLOWED_METHODS is actually HTTP_QUERY_ALLOW\r\n"
  5491. " HTTP_QUERY_PUBLIC_METHODS is actually HTTP_QUERY_PUBLIC\r\n"
  5492. "\r\n"
  5493. "(All #defines in wininet.h) "
  5494. "\r\n"
  5495. "\r\n"
  5496. "Submitted by Mario Contestabile. "
  5497. "\r\n"
  5498. "\r\n"
  5499. "\0\0\0\0"
  5500. end
  5501.  
  5502. 201    RCDATA
  5503. begin
  5504.     "mfc30.hlp\0"
  5505.     "#183    COleDateTime::GetYear\0"
  5506.     "COleDateTime::GetYear\0"
  5507.     "COleDateTime::GetYear\0"
  5508.  
  5509. "WDJ MFC Annotation #183"
  5510. "\r\n"
  5511. "\r\n"
  5512. "If the status of this COleDateTime object is not valid, the "
  5513. "return value is AFX_OLE_DATETIME_ERROR and not "
  5514. "AFX_DATETIME_ERROR as documented. This affects the following "
  5515. "member functions: GetYear(), GetMonth(), GetDay(), GetHour(), "
  5516. "GetMinute(), GetSecond(), GetDayOfWeek(), and GetDayOfYear(). "
  5517. "\r\n"
  5518. "\r\n"
  5519. "\r\n"
  5520. "Submitted by Mario Contestabile. "
  5521. "\r\n"
  5522. "\r\n"
  5523. "\r\n"
  5524. "\0\0\0\0"
  5525. end
  5526.  
  5527. 202    RCDATA
  5528. begin
  5529.     "win32.hlp\0"
  5530.     "#184    ScrollWindowEx\0"
  5531.     "ScrollWindowEx AND \042See also\042\0"
  5532.     "ScrollWindowEx\0"
  5533.  
  5534. "WDJ SDK Annotation #184"
  5535. "\r\n"
  5536. "\r\n"
  5537. "If the prcClip parameter is NULL, no clipping is performed on the "
  5538. "scroll rectangle. "
  5539. "\r\n"
  5540. "\r\n"
  5541. "Submitted by V. Ramachandran. "
  5542. "\r\n"
  5543. "\r\n"
  5544. "\0\0\0\0"
  5545. end
  5546.  
  5547. 203    RCDATA
  5548. begin
  5549.     "win32.hlp\0"
  5550.     "#185    WM_CONTEXTMENU\0"
  5551.     "WM_CONTEXTMENU AND \042See also\042\0"
  5552.     "WM_CONTEXTMENU\0"
  5553.  
  5554. "WDJ SDK Annotation #185"
  5555. "\r\n"
  5556. "\r\n"
  5557. "If the user uses the keyboard shortcut (Shift-F10 or the special  "
  5558. "key on a Microsoft keyboard) to activate the context menu, the  "
  5559. "xPos and yPos parameters are -1, -1. "
  5560. "\r\n"
  5561. "\r\n"
  5562. "Submitted by Katy Mulvey. "
  5563. "\r\n"
  5564. "\r\n"
  5565. "\0\0\0\0"
  5566. end
  5567.  
  5568. 204    RCDATA
  5569. begin
  5570.     "win32.hlp\0"
  5571.     "#186    GetLastError\0"
  5572.     "GetLastError AND \042return values\042 AND parameters NOT S_OK\0"
  5573.     "GetLastError\0"
  5574.  
  5575. "WDJ SDK Annotation #186"
  5576. "\r\n"
  5577. "\r\n"
  5578. "The Win32 Programmer's Reference documentation for "
  5579. "GetLastError()  incorrectly states that a listing of the "
  5580. "error codes is found in  WINNT.H. It is actually found in "
  5581. "the file WINERROR.H  "
  5582. "\r\n"
  5583. "\r\n"
  5584. "Note: This error has been corrected in the Jan 97 MSDN. "
  5585. "\r\n"
  5586. "\r\n"
  5587. "Submitted by Katy Mulvey. "
  5588. "\r\n"
  5589. "\r\n"
  5590. "\0\0\0\0"
  5591. end
  5592.  
  5593. 205    RCDATA
  5594. begin
  5595.     "win32.hlp\0"
  5596.     "#187    CreateWindowEx\0"
  5597.     "CreateWindowEx AND \042See also\042\0"
  5598.     "CreateWindowEx\0"
  5599.  
  5600. "WDJ SDK Annotation #187"
  5601. "\r\n"
  5602. "\r\n"
  5603. "The documentation does not mention that you can call GetLastError "
  5604. "to get extended error information if the function fails. "
  5605. "\r\n"
  5606. "\r\n"
  5607. "Submitted by V. Ramachandran. "
  5608. "\r\n"
  5609. "\r\n"
  5610. "\0\0\0\0"
  5611. end
  5612.  
  5613. 206    RCDATA
  5614. begin
  5615.     "win32.hlp\0"
  5616.     "#188    WM_SYSCOMMAND\0"
  5617.     "WM_SYSCOMMAND AND \042See also\042\0"
  5618.     "WM_SYSCOMMAND\0"
  5619.  
  5620. "WDJ SDK Annotation #188"
  5621. "\r\n"
  5622. "\r\n"
  5623. "If the wParam is SC_KEYMENU, the lParam contains the "
  5624. "character code of the key used in combination with the Alt "
  5625. "key to display the popup menu. For example, pressing Alt+F "
  5626. "to display the File popup will cause a WM_SYSCOMMAND with "
  5627. "wParam equal to SC_KEYMENU and lParam equal to 'f'. "
  5628. "\r\n"
  5629. "\r\n"
  5630. "Reference: MSDN Article ID Q92527. "
  5631. "\r\n"
  5632. "\r\n"
  5633. "Submitted by V. Ramachandran. "
  5634. "\r\n"
  5635. "\r\n"
  5636. "\0\0\0\0"
  5637. end
  5638.  
  5639. 207    RCDATA
  5640. begin
  5641.     "win32.hlp\0"
  5642.     "#189    CreateWindow\0"
  5643.     "CreateWindow AND \042See also\042\0"
  5644.     "CreateWindow\0"
  5645.  
  5646. "WDJ SDK Annotation #189"
  5647. "\r\n"
  5648. "\r\n"
  5649. "For creating static controls with the SS_ICON style, you "
  5650. "need to specify the icon name in the lpWindowName parameter. "
  5651. "However, if you have an icon resource identified with a "
  5652. "numeric id (instead of a string), you need to specify #xxx "
  5653. "(where xxx is the numeric identifier for the ICON resource) "
  5654. "in the lpWindowName  parameter. You should not use the "
  5655. "MAKEINTRESOURCE macro. "
  5656. "\r\n"
  5657. "\r\n"
  5658. "Submitted by V. Ramachandran. "
  5659. "\r\n"
  5660. "\r\n"
  5661. "\0\0\0\0"
  5662. end
  5663.  
  5664. 208    RCDATA
  5665. begin
  5666.     "win32.hlp\0"
  5667.     "#189    CreateWindowEx\0"
  5668.     "CreateWindowEx AND \042See also\042\0"
  5669.     "CreateWindowEx\0"
  5670.  
  5671. "WDJ SDK Annotation #189"
  5672. "\r\n"
  5673. "\r\n"
  5674. "For creating static controls with the SS_ICON style, you "
  5675. "need to specify the icon name in the lpWindowName parameter. "
  5676. "However, if you have an icon resource identified with a "
  5677. "numeric id (instead of a string), you need to specify #xxx "
  5678. "(where xxx is the numeric identifier for the ICON resource) "
  5679. "in the lpWindowName  parameter. You should not use the "
  5680. "MAKEINTRESOURCE macro. "
  5681. "\r\n"
  5682. "\r\n"
  5683. "Submitted by V. Ramachandran. "
  5684. "\r\n"
  5685. "\r\n"
  5686. "\0\0\0\0"
  5687. end
  5688.  
  5689. 209    RCDATA
  5690. begin
  5691.     "win32.hlp\0"
  5692.     "#190    WM_GETTEXT\0"
  5693.     "WM_GETTEXT AND \042See also\042\0"
  5694.     "WM_GETTEXT\0"
  5695.  
  5696. "WDJ SDK Annotation #190"
  5697. "\r\n"
  5698. "\r\n"
  5699. "In Win32, you cannot send the WM_SETTEXT to a static control "
  5700. "with the SS_ICON style to set the icon. Therefore, you "
  5701. "should not use the WM_GETTEXT message to retrieve the icon "
  5702. "handle of static controls with the SS_ICON style. Use the "
  5703. "STM_SETICON and STM_GETICON messages instead. "
  5704. "\r\n"
  5705. "\r\n"
  5706. "Submitted by V. Ramachandran. "
  5707. "\r\n"
  5708. "\r\n"
  5709. "\0\0\0\0"
  5710. end
  5711.  
  5712. 210    RCDATA
  5713. begin
  5714.     "win32.hlp\0"
  5715.     "#191    RegisterHotKey\0"
  5716.     "RegisterHotKey AND \042See also\042\0"
  5717.     "RegisterHotKey\0"
  5718.  
  5719. "WDJ SDK Annotation #191"
  5720. "\r\n"
  5721. "\r\n"
  5722. "If you want to disable task switching under Win32, you can "
  5723. "do so by registering hot keys for Ctrl+Esc and Alt+Tab. "
  5724. "\r\n"
  5725. "\r\n"
  5726. "Reference: MSDN Article ID Q125614 "
  5727. "Submitted by V. Ramachandran. "
  5728. "\r\n"
  5729. "\r\n"
  5730. "\0\0\0\0"
  5731. end
  5732.  
  5733. 211    RCDATA
  5734. begin
  5735.     "win32.hlp\0"
  5736.     "#192    CreateFile\0"
  5737.     "CreateFile AND \042See also\042\0"
  5738.     "CreateFile\0"
  5739.  
  5740. "WDJ SDK Annotation #192"
  5741. "\r\n"
  5742. "\r\n"
  5743. "Under Windows NT, when CreateFile is used with  the "
  5744. "dwCreationDistribution parameter equal to CREATE_ALWAYS,  "
  5745. "the call fails if the file exists and is hidden. "
  5746. "GetLastError() returns ERROR_ACCESS_DENIED. However, the "
  5747. "call succeeds under Windows 95 creating a new  file that is "
  5748. "not hidden. "
  5749. "\r\n"
  5750. "\r\n"
  5751. "Submitted by Abdul Nizar. "
  5752. "\r\n"
  5753. "\r\n"
  5754. "\0\0\0\0"
  5755. end
  5756.  
  5757. 212    RCDATA
  5758. begin
  5759.     "mfc30.hlp\0"
  5760.     "#192    CFile::Open\0"
  5761.     "CFile::Open\0"
  5762.     "CFile::Open\0"
  5763.  
  5764. "WDJ MFC Annotation #192"
  5765. "\r\n"
  5766. "\r\n"
  5767. "Under Windows NT, if the nOpenFlags parameter is ORed with  "
  5768. "CFile::modeCreate and not ORed with CFile::modeNoTruncate,  "
  5769. "CFile::Open fails if the file exists and is hidden. However, "
  5770. "the call succeeds under Windows 95 creating a new file that "
  5771. "is  not hidden. "
  5772. "\r\n"
  5773. "\r\n"
  5774. "Submitted by Abdul Nizar. "
  5775. "\r\n"
  5776. "\r\n"
  5777. "\r\n"
  5778. "\0\0\0\0"
  5779. end
  5780.  
  5781. 213    RCDATA
  5782. begin
  5783.     "mfc30.hlp\0"
  5784.     "#193    CListCtrl::SetColumnWidth\0"
  5785.     "CListCtrl::SetColumnWidth\0"
  5786.     "CListCtrl::SetColumnWidth\0"
  5787.  
  5788. "WDJ MFC Annotation #193"
  5789. "\r\n"
  5790. "\r\n"
  5791. "The cx parameter is the new width of the column in listview "
  5792. "coordinates, or one of the following "
  5793. "\r\n"
  5794. "\r\n"
  5795. "   LVSCW_AUTOSIZE             Automatically sizes the column.\r\n"
  5796. "   LVSCW_AUTOSIZE_USEHEADER   Automatically sizes the column to \r\n"
  5797. "                              fit the header text\r\n"
  5798. "\r\n"
  5799. "Submitted by Ramon de Klein.  "
  5800. "\r\n"
  5801. "\r\n"
  5802. "\0\0\0\0"
  5803. end
  5804.  
  5805. 214    RCDATA
  5806. begin
  5807.     "win32.hlp\0"
  5808.     "#194    PeekMessage\0"
  5809.     "PeekMessage AND \042See also\042\0"
  5810.     "PeekMessage\0"
  5811.  
  5812. "WDJ SDK Annotation #194"
  5813. "\r\n"
  5814. "\r\n"
  5815. "PeekMessage will always retrieve WM_QUIT messages,  "
  5816. "irrespective of the setting of uMsgFilterMin and  "
  5817. "uMsgFilterMax. "
  5818. "\r\n"
  5819. "\r\n"
  5820. "Submitted by Graham King. "
  5821. "\r\n"
  5822. "\r\n"
  5823. "\0\0\0\0"
  5824. end
  5825.  
  5826. 215    RCDATA
  5827. begin
  5828.     "mfc30.hlp\0"
  5829.     "#195    CWinApp::OnIdle\0"
  5830.     "CWinApp::OnIdle\0"
  5831.     "CWinApp::OnIdle\0"
  5832.  
  5833. "WDJ MFC Annotation #195"
  5834. "\r\n"
  5835. "\r\n"
  5836. "If you do not want OnIdle to be called whenever a  "
  5837. "message is retrieved from the message queue, you can  "
  5838. "override the IsIdleMessage. If an application has set  "
  5839. "a very short timer or if the system is sending the  "
  5840. "undocumented WM_SYSTIMER (0x118) message, then OnIdle  "
  5841. "will be called repeatedly, and degrade performance. "
  5842. "\r\n"
  5843. "\r\n"
  5844. "Submitted by Adrian Pybus. "
  5845. "\r\n"
  5846. "\r\n"
  5847. "\0\0\0\0"
  5848. end
  5849.  
  5850. 216    RCDATA
  5851. begin
  5852.     "mfc30.hlp\0"
  5853.     "#196    CImageList::Create\0"
  5854.     "CImageList::Create\0"
  5855.     "CImageList::Create\0"
  5856.  
  5857. "WDJ MFC Annotation #196"
  5858. "\r\n"
  5859. "\r\n"
  5860. "The documentation for argument bMask is incorrect.  In  "
  5861. "fact this value is a UINT bitmask, and accepts  "
  5862. "combinations of the following values: "
  5863. "\r\n"
  5864. "\r\n"
  5865. "ILC_MASK        0x0001    // ImageList has a mask "
  5866. "ILC_COLORDDB    0x00FE    // use device dependent bitmap "
  5867. "ILC_COLOR4      0x0004    // use 4bpp DIBSection "
  5868. "ILC_COLOR8      0x0008    // use 8bpp DIBSection "
  5869. "ILC_COLOR16     0x0010    // use 16bpp DIBSection "
  5870. "ILC_COLOR24     0x0018    // use 24bpp DIBSection "
  5871. "ILC_COLOR32     0x0020    // use 32bpp DIBSection "
  5872. "ILC_PALETTE     0x0800    // use palette with image list "
  5873. "\r\n"
  5874. "\r\n"
  5875. "Refer to ImageList_Create for more information about  "
  5876. "these flags. "
  5877. "\r\n"
  5878. "\r\n"
  5879. "Submitted by Frank Brown. "
  5880. "\r\n"
  5881. "\r\n"
  5882. "\0\0\0\0"
  5883. end
  5884.  
  5885. 217    RCDATA
  5886. begin
  5887.     "win32.hlp\0"
  5888.     "#197    NetServerDiskEnum\0"
  5889.     "NetServerDiskEnum AND \042See also\042\0"
  5890.     "NetServerDiskEnum\0"
  5891.  
  5892. "WDJ SDK Annotation #197"
  5893. "\r\n"
  5894. "\r\n"
  5895. "The Win32 documentation for NetServerDiskEnum is "
  5896. "incorrect on the following four points: "
  5897. "\r\n"
  5898. "\r\n"
  5899. " 1. The 'level' parameter has to be 0, and not 100 as documented.\r\n"
  5900. " 2. The function returns the enumerated disks as an array\r\n"
  5901. "of 3 character Unicode strings pointed to by the bufptr  "
  5902. "parameter. "
  5903. "\r\n"
  5904. " 3. NetServerDiskEnum fails if its \042servername\042 argument \r\n"
  5905. "is a Win95 computer.  "
  5906. "\r\n"
  5907. " 4. This function is available only on NT (Unicode only).\r\n"
  5908. "However, the header file (lmserver.h) declarations  "
  5909. "specify LPTSTR for string parameters - they actually  "
  5910. "require LPWSTR strings. "
  5911. "\r\n"
  5912. "\r\n"
  5913. "You would call this function as follows: "
  5914. "\r\n"
  5915. "\r\n"
  5916. "    WCHAR (*pDrives)[3] = NULL;\r\n"
  5917. "    ret = NetServerDiskEnum(\r\n"
  5918. "        (LPTSTR)servername, \r\n"
  5919. "        0,\r\n"
  5920. "        (LPBYTE *)(&pDrives),\r\n"
  5921. "        0,\r\n"
  5922. "        &entriesRead,\r\n"
  5923. "        &totalEntries,\r\n"
  5924. "        &resumeHandle ) ;\r\n"
  5925. "\r\n"
  5926. "Submitted by Aaron J Margosis. "
  5927. "\r\n"
  5928. "\r\n"
  5929. "\0\0\0\0"
  5930. end
  5931.  
  5932. 218    RCDATA
  5933. begin
  5934.     "win32.hlp\0"
  5935.     "#198    StringFromGUID2\0"
  5936.     "StringFromGUID2 AND \042See also\042\0"
  5937.     "StringFromGUID2\0"
  5938.  
  5939. "WDJ SDK Annotation #198"
  5940. "\r\n"
  5941. "\r\n"
  5942. "The string received is enclosed by curly braces like  "
  5943. "the following sample and not square braces as indicated  "
  5944. "in the documentation. "
  5945. "{c200e360-38c5-11ce-ae62-08002b2b79ef} "
  5946. "\r\n"
  5947. "\r\n"
  5948. "Submitted by V.Ramachandran. "
  5949. "\r\n"
  5950. "\r\n"
  5951. "\0\0\0\0"
  5952. end
  5953.  
  5954. 219    RCDATA
  5955. begin
  5956.     "win32.hlp\0"
  5957.     "#199    GetUpdateRect\0"
  5958.     "GetUpdateRect AND \042See also\042\0"
  5959.     "GetUpdateRect\0"
  5960.  
  5961. "WDJ SDK Annotation #199"
  5962. "\r\n"
  5963. "\r\n"
  5964. "If the window was created with the CS_OWNDC style,  "
  5965. "GetUpdateRect always retrieves the rectangle in  "
  5966. "logical coordinates irrespective of the mapping mode. "
  5967. "\r\n"
  5968. "\r\n"
  5969. "Submitted by V.Ramachandran. "
  5970. "\r\n"
  5971. "\r\n"
  5972. "\0\0\0\0"
  5973. end
  5974.  
  5975. 220    RCDATA
  5976. begin
  5977.     "win32.hlp\0"
  5978.     "#200    BrowseCallbackProc\0"
  5979.     "BrowseCallbackProc AND \042See also\042\0"
  5980.     "BrowseCallbackProc\0"
  5981.  
  5982. "WDJ SDK Annotation #200"
  5983. "\r\n"
  5984. "\r\n"
  5985. "The documentation errs in the parameters for the  "
  5986. "notifications: "
  5987. "BFFM_INITIALIZED: lParam is 0, lpData is the application  "
  5988. "defined value specified in the BROWSEINFO structure. "
  5989. "BFFM_SELCHANGED: lParam points to the item identifier list  "
  5990. "for the newly selected item, lpData is the application  "
  5991. "defined value specified in the BROWSEINFO structure. "
  5992. "\r\n"
  5993. "\r\n"
  5994. "For the BFFM_ENABLEOK message, the lParam should be 0 "
  5995. "for disabling, and non-zero for enabling the OK button, "
  5996. "and not the wParam as documented. "
  5997. "\r\n"
  5998. "\r\n"
  5999. "Submitted by John Bates. "
  6000. "\r\n"
  6001. "\r\n"
  6002. "\0\0\0\0"
  6003. end
  6004.  
  6005. 221    RCDATA
  6006. begin
  6007.     "win32.hlp\0"
  6008.     "#201    SHBrowseForFolder\0"
  6009.     "SHBrowseForFolder AND \042See also\042\0"
  6010.     "SHBrowseForFolder\0"
  6011.  
  6012. "WDJ SDK Annotation #201"
  6013. "\r\n"
  6014. "\r\n"
  6015. "If the BIF_RETURNONLYFSDIRS flag is specified, the  "
  6016. "OK button stays enabled for a \042\\\\computer\042 item, not  "
  6017. "just the \042\\\\computer\\share\042 and directory items.  "
  6018. "SHGetPathFromIDList() will fail if you pass it the  "
  6019. "LPITEMIDLIST returned from SHBrowseForFolder when you  "
  6020. "select just a computer name. "
  6021. "\r\n"
  6022. "\r\n"
  6023. "Submitted by John Bates. "
  6024. "\r\n"
  6025. "\r\n"
  6026. "\0\0\0\0"
  6027. end
  6028.  
  6029. 222    RCDATA
  6030. begin
  6031.     "win32.hlp\0"
  6032.     "#202    MoveWindow\0"
  6033.     "MoveWindow AND \042See also\042\0"
  6034.     "MoveWindow\0"
  6035.  
  6036. "WDJ SDK Annotation #202"
  6037. "\r\n"
  6038. "\r\n"
  6039. "If the bRepaint flag is FALSE, no repainting of any "
  6040. "kind occurs. The Remarks section is incorrect in saying "
  6041. "that a WM_PAINT message is placed in the message queue. "
  6042. "\r\n"
  6043. "\r\n"
  6044. "Submitted by V.Ramachandran. "
  6045. "\r\n"
  6046. "\r\n"
  6047. "\0\0\0\0"
  6048. end
  6049.  
  6050. 223    RCDATA
  6051. begin
  6052.     "win32.hlp\0"
  6053.     "#203    WideCharToMultiByte\0"
  6054.     "WideCharToMultiByte AND \042See also\042\0"
  6055.     "WideCharToMultiByte\0"
  6056.  
  6057. "WDJ SDK Annotation #203"
  6058. "\r\n"
  6059. "\r\n"
  6060. "If the function succeeds, the return value is equal to  "
  6061. "the string length plus the terminating NULL character. "
  6062. "If cchMultiByte specifies a value less than necessary, "
  6063. "the function returns 0, and GetLastError returns "
  6064. "ERROR_INSUFFICIENT_BUFFER. However, cchMultiByte  "
  6065. "characters are copied to the buffer pointed to by "
  6066. "lpMultiByteStr. "
  6067. "\r\n"
  6068. "\r\n"
  6069. "\0\0\0\0"
  6070. end
  6071.  
  6072.